diff options
| author | ruki <[email protected]> | 2022-01-25 00:24:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-01-24 20:31:42 +0800 |
| commit | a1ecc4de70ff0e108bcf89fbccfd25189239071c (patch) | |
| tree | 08427c2894ba9c7fc11eabdb3f961b31b55e3cf6 /tests/modules | |
| parent | 335c29ab1f40b8db81dce90388d846bdb0682e10 (diff) | |
fix path
Diffstat (limited to 'tests/modules')
| -rw-r--r-- | tests/modules/path/test.lua | 10 |
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 |
