diff options
Diffstat (limited to 'src/jsTest')
-rw-r--r-- | src/jsTest/kotlin/io/PathTest.kt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/jsTest/kotlin/io/PathTest.kt b/src/jsTest/kotlin/io/PathTest.kt index 174c2b2..9ba8a9e 100644 --- a/src/jsTest/kotlin/io/PathTest.kt +++ b/src/jsTest/kotlin/io/PathTest.kt @@ -90,4 +90,15 @@ class PathTest : FunSpec({ } } } + test("relaitivization works") { + forAll( + row("/a/b", "/a", ".."), + row("/a", "/a/b", "b"), + row("/a/b", "/a/c", "../c"), + ) { a, b, c -> + assertSoftly { + Path.of(a).shouldBeTypeOf<Path.Absolute>().relativize(Path.of(b)) shouldBe Path.of(c) + } + } + } }) |