aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/paths.tm16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/paths.tm b/test/paths.tm
index 7685d089..14a15299 100644
--- a/test/paths.tm
+++ b/test/paths.tm
@@ -60,6 +60,22 @@ func main()
= "tar.gz"
>> p.extension(full=no)
= "gz"
+ >> p.has_extension("gz")
+ = yes
+ >> p.has_extension(".gz")
+ = yes
+ >> p.has_extension("tar.gz")
+ = yes
+ >> p.has_extension("txt")
+ = no
+ >> p.has_extension("")
+ = no
+ >> (./foo).has_extension("")
+ = yes
+ >> (..).has_extension("")
+ = yes
+ >> (~/.foo).has_extension("foo")
+ = no
>> (~/.foo).extension()
= ""
>> (~/foo).extension()