Add some test cases for module/expand-path
(marshpeg ~(cmt "abcdf" ,identity))
(marshpeg '(group "abc"))
+# Module path expansion
+(setdyn :current-file "some-dir/some-file")
+(defn test-expand [path temp]
+ (string (module/expand-path path temp)))
+
+(assert (= (test-expand "abc" ":cur:/:all:") "some-dir/abc") "module/expand-path 1")
+(assert (= (test-expand "./abc" ":cur:/:all:") "some-dir/abc") "module/expand-path 2")
+(assert (= (test-expand "abc/def.txt" ":cur:/:name:") "some-dir/def.txt") "module/expand-path 3")
+(assert (= (test-expand "abc/def.txt" ":cur:/:dir:/sub/:name:") "some-dir/abc/sub/def.txt") "module/expand-path 4")
+
(end-suite)
