summaryrefslogtreecommitdiff
path: root/tests/modules/path/test.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2022-01-25 00:24:28 +0800
committerruki <[email protected]>2022-01-24 20:31:42 +0800
commita1ecc4de70ff0e108bcf89fbccfd25189239071c (patch)
tree08427c2894ba9c7fc11eabdb3f961b31b55e3cf6 /tests/modules/path/test.lua
parent335c29ab1f40b8db81dce90388d846bdb0682e10 (diff)
fix path
Diffstat (limited to 'tests/modules/path/test.lua')
-rw-r--r--tests/modules/path/test.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/modules/path/test.lua b/tests/modules/path/test.lua
index 4217dec16..80e87c5aa 100644
--- a/tests/modules/path/test.lua
+++ b/tests/modules/path/test.lua
@@ -24,4 +24,12 @@ function test_splitenv_unix(t)
t:are_equal(path.splitenv('a%tag:b%tag'), {'a','b'})
t:are_equal(path.splitenv('a%tag:b%%tag%%'), {'a','b'})
t:are_equal(path.splitenv('a%tag:b:%tag:'), {'a','b'})
-end \ No newline at end of file
+end
+
+function test_extension(t)
+ t:are_equal(path.extension("1.1/abc"), "")
+ t:are_equal(path.extension("1.1\\abc"), "")
+ t:are_equal(path.extension("foo.so"), ".so")
+ t:are_equal(path.extension("/home/foo.so"), ".so")
+ t:are_equal(path.extension("\\home\\foo.so"), ".so")
+end