diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-06-24 13:37:09 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-06-24 13:37:09 -0400 |
| commit | 271017ba9970e4220e1bd0dc83ce146afe9222a2 (patch) | |
| tree | 995233d21141f164aa5f9e1d9b7bab757124e622 /test/paths.tm | |
| parent | e122e5525ef044c25c2cd888bc267f7a2bd91b4f (diff) | |
Add Path.has_extension() and update manpages/api docs
Diffstat (limited to 'test/paths.tm')
| -rw-r--r-- | test/paths.tm | 16 |
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() |
