Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

8
LINES

< > BotCompany Repo | #1032130 // test_nameRelativeToPhysicalSubdirectory (OK)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (3231L/18K).

svoid test_nameRelativeToPhysicalSubdirectory() {
  File dir = createTempDir();
  File f = touchFile(newFile(dir, "hello"));
  File f2 = touchFile(newFile(dir, "sub/bla"));
  assertEqualsVerbose(null, nameRelativeToPhysicalSubdirectory(dir, dir));
  assertEqualsVerbose("hello", nameRelativeToPhysicalSubdirectory(f, dir));
  assertEqualsVerbose("sub" + fileSep() + "bla", nameRelativeToPhysicalSubdirectory(f2, dir));
}

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx

No comments. add comment

Snippet ID: #1032130
Snippet name: test_nameRelativeToPhysicalSubdirectory (OK)
Eternal ID of this version: #1032130/3
Text MD5: fea17598089a5ee83cc8a8c5c5d8a972
Transpilation MD5: a63c6be68178ee77c99f77b29e9f5e61
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-08-14 04:12:57
Source code size: 427 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 88 / 143
Version history: 2 change(s)
Referenced in: [show references]