Skip to content

Commit 4225f3c

Browse files
committed
code simplification, more tests, bug fixing
1 parent 328eeaa commit 4225f3c

File tree

3 files changed

+128
-161
lines changed

3 files changed

+128
-161
lines changed

examples/src/Examples.purs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,15 @@ module Examples where
6262
test "parseRelDir - empty string" (parseRelDir "") (Just $ currentDir)
6363

6464
test "parseRelFile - image.png" (parseRelFile "image.png") (Just $ file "image.png")
65+
66+
test "parseRelFile - ./image.png" (parseRelFile "./image.png") (Just $ file "image.png")
67+
68+
test "parseRelFile - foo/image.png" (parseRelFile "foo/image.png") (Just $ dir "foo" </> file "image.png")
69+
70+
trace $ parsePath show show show show "./foo/bar/"
71+
72+
test "parseRelDir - foo/" (parseRelDir "foo/") (Just $ dir "foo")
73+
74+
test "parseRelDir - foo/bar" (parseRelDir "foo/bar/") (Just $ dir "foo" </> dir "bar")
75+
76+
test "parseRelDir - ./foo/bar" (parseRelDir "./foo/bar/") (Just $ dir "foo" </> dir "bar")

0 commit comments

Comments
 (0)