summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-07-22 07:42:38 -0700
committerKaz Kylheku <kaz@kylheku.com>2021-07-22 07:42:38 -0700
commit43c0bb967799069ba4042a7e1974750e94f1478c (patch)
treea18bb39ccc888ed451a9f3ff438a84870f93562d
parent83495e043be0e8d0845414831267188182db6bc0 (diff)
downloadtxr-43c0bb967799069ba4042a7e1974750e94f1478c.tar.gz
txr-43c0bb967799069ba4042a7e1974750e94f1478c.tar.bz2
txr-43c0bb967799069ba4042a7e1974750e94f1478c.zip
pure-rel-path-p: add tests.
* tests/018/path.tl: New tests.
-rw-r--r--tests/018/path.tl23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/018/path.tl b/tests/018/path.tl
index 6a5c69ee..49aebe11 100644
--- a/tests/018/path.tl
+++ b/tests/018/path.tl
@@ -257,3 +257,26 @@
(portable-abs-path-p "0:/abc") t
(portable-abs-path-p "AB0:/abc") t
(portable-abs-path-p "cd5:/abc") t)
+
+(mtest
+ (pure-rel-path-p "") t
+ (pure-rel-path-p "/") nil
+ (pure-rel-path-p "\\") nil
+ (pure-rel-path-p "/abc") nil
+ (pure-rel-path-p ".") nil
+ (pure-rel-path-p "./") nil
+ (pure-rel-path-p ".\\") nil
+ (pure-rel-path-p ".abc") t
+ (pure-rel-path-p ".abc/") t
+ (pure-rel-path-p ".abc\\") t
+ (pure-rel-path-p ":") t
+ (pure-rel-path-p "a:") nil
+ (pure-rel-path-p "A:") nil
+ (pure-rel-path-p "0:") nil
+ (pure-rel-path-p "9:") nil
+ (pure-rel-path-p "_:") t
+ (pure-rel-path-p "abc") t
+ (pure-rel-path-p "abc/def") t
+ (pure-rel-path-p "abc/.") t
+ (pure-rel-path-p "abc\\def") t
+ (pure-rel-path-p "abc\\.") t)