summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-04-12 19:38:05 -0700
committerOri Bernstein <ori@eigenstate.org>2015-04-12 19:38:05 -0700
commitb8739b70c8fbb2f8930c7cb2b1d1a6544aa7024f (patch)
treedf172315866569054ca4442c8096aa8a481b480f /test
parent32d45b637cc4faa4d3510c9f53c20c377c660723 (diff)
downloadmc-b8739b70c8fbb2f8930c7cb2b1d1a6544aa7024f.tar.gz
Now actually fix it.
Diffstat (limited to 'test')
-rw-r--r--test/data/stdpathnorm-expected4
-rw-r--r--test/stdpathnorm.myr7
2 files changed, 11 insertions, 0 deletions
diff --git a/test/data/stdpathnorm-expected b/test/data/stdpathnorm-expected
index 0e6ec64..8b4b045 100644
--- a/test/data/stdpathnorm-expected
+++ b/test/data/stdpathnorm-expected
@@ -22,3 +22,7 @@ foo
.
/
..
+a/b
+a/b/c
+foo
+foo/bar
diff --git a/test/stdpathnorm.myr b/test/stdpathnorm.myr
index 15924e3..caff027 100644
--- a/test/stdpathnorm.myr
+++ b/test/stdpathnorm.myr
@@ -36,4 +36,11 @@ const main = {
std.put("%s\n", std.pathnorm("foo/bar/.././.."))
std.put("%s\n", std.pathnorm("//foo/../bar/../.."))
std.put("%s\n", std.pathnorm("foo/../bar/../.."))
+
+ /* vanilla pathjoin */
+ std.put("%s\n", std.pathcat("a", "b"))
+ std.put("%s\n", std.pathjoin(["a", "b", "c"][:]))
+ /* pathjoin with empty dirs */
+ std.put("%s\n", std.pathcat("", "foo"))
+ std.put("%s\n", std.pathjoin(["", "foo", "bar"][:]))
}