MCPcopy Create free account
hub / github.com/PCGen/pcgen / testRelativePaths

Method testRelativePaths

code/src/test/pcgen/util/FileHelperTest.java:39–47  ·  view source on GitHub ↗

Test the relative paths.

()

Source from the content-addressed store, hash-verified

37 * Test the relative paths.
38 */
39 @Test
40 public void testRelativePaths()
41 {
42 final File base = new File("/one/two/three/four/foo.txt");
43
44 final File sameDir = new File("/one/two/three/four/bar.txt");
45 final String path = FileHelper.findRelativePath(base, sameDir);
46 assertEquals("bar.txt", path, "wrong when same directory");
47 }
48
49 /**
50 * Test relative paths but back one (../)

Callers

nothing calls this directly

Calls 1

findRelativePathMethod · 0.95

Tested by

no test coverage detected