summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-04-12 19:22:56 -0700
committerOri Bernstein <ori@eigenstate.org>2015-04-12 19:22:56 -0700
commit32d45b637cc4faa4d3510c9f53c20c377c660723 (patch)
tree4b260c5d7201d19ff6a43dc724af94eebf7d2c57 /test
parent8a6221f985e1a493a163d0dde1c025231e1adafb (diff)
downloadmc-32d45b637cc4faa4d3510c9f53c20c377c660723.tar.gz
Fix std.pathnorm for empty strings.
The normalized version of "" should be ".", not "/". Make it so.
Diffstat (limited to 'test')
-rw-r--r--test/data/stdpathnorm-expected1
-rw-r--r--test/stdpathnorm.myr1
2 files changed, 2 insertions, 0 deletions
diff --git a/test/data/stdpathnorm-expected b/test/data/stdpathnorm-expected
index 0754a24..0e6ec64 100644
--- a/test/data/stdpathnorm-expected
+++ b/test/data/stdpathnorm-expected
@@ -1,3 +1,4 @@
+.
foo
foo/bar
/foo/bar
diff --git a/test/stdpathnorm.myr b/test/stdpathnorm.myr
index 1e8c3d6..15924e3 100644
--- a/test/stdpathnorm.myr
+++ b/test/stdpathnorm.myr
@@ -2,6 +2,7 @@ use std
const main = {
/* untouched */
+ std.put("%s\n", std.pathnorm(""))
std.put("%s\n", std.pathnorm("foo"))
std.put("%s\n", std.pathnorm("foo/bar"))
std.put("%s\n", std.pathnorm("/foo/bar"))