Merge pull request #754 from rgrinberg/path-append-behavior
Unit tests for current Path.append behavior
This commit is contained in:
commit
2dcd95d3dd
|
@ -128,3 +128,33 @@ Path.insert_after_build_dir_exn (Path.relative Path.build_dir "qux") "foobar"
|
|||
[%%expect{|
|
||||
- : Stdune.Path.t = _build/foobar/qux
|
||||
|}]
|
||||
|
||||
Path.append Path.build_dir (Path.relative Path.root "foo")
|
||||
[%%expect{|
|
||||
- : Stdune.Path.t = _build/foo
|
||||
|}]
|
||||
|
||||
Path.append Path.build_dir (Path.relative Path.build_dir "foo")
|
||||
[%%expect{|
|
||||
- : Stdune.Path.t = _build/_build/foo
|
||||
|}]
|
||||
|
||||
Path.append Path.root (Path.relative Path.build_dir "foo")
|
||||
[%%expect{|
|
||||
- : Stdune.Path.t = _build/foo
|
||||
|}]
|
||||
|
||||
Path.append Path.root (Path.relative Path.root "foo")
|
||||
[%%expect{|
|
||||
- : Stdune.Path.t = foo
|
||||
|}]
|
||||
|
||||
Path.append (Path.of_string "/root") (Path.relative Path.root "foo")
|
||||
[%%expect{|
|
||||
- : Stdune.Path.t = /root/foo
|
||||
|}]
|
||||
|
||||
Path.append (Path.of_string "/root") (Path.relative Path.build_dir "foo")
|
||||
[%%expect{|
|
||||
- : Stdune.Path.t = /root/_build/foo
|
||||
|}]
|
||||
|
|
Loading…
Reference in New Issue