Tests for Path.reach

This commit is contained in:
Rudi Grinberg 2018-05-03 17:23:19 +07:00
parent 4d8ca489be
commit c149043fde
1 changed files with 15 additions and 0 deletions

View File

@ -66,3 +66,18 @@ Path.explode (Path.of_string "");
[%%expect{|
- : string list option = Some []
|}]
Path.reach (Path.of_string "/foo/baz") ~from:(Path.of_string "/foo/bar");
[%%expect{|
- : string = "/foo/baz"
|}]
Path.reach (Path.of_string "/foo/bar") ~from:(Path.of_string "baz")
[%%expect{|
- : string = "/foo/bar"
|}]
Path.reach (Path.of_string "bar/foo") ~from:(Path.of_string "bar/baz/y")
[%%expect{|
- : string = "../../foo"
|}]