From 3e1becfa688f2cba280c475caf39aec3ce14a095 Mon Sep 17 00:00:00 2001 From: nea Date: Mon, 16 Aug 2021 15:05:45 +0200 Subject: more test --- src/jsTest/kotlin/io/PathTest.kt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/jsTest/kotlin') 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().relativize(Path.of(b)) shouldBe Path.of(c) + } + } + } }) -- cgit