|
8 | 8 | p_relative_to |
9 | 9 | p_proximate_to |
10 | 10 | p_is_absolute |
11 | | -in_filename = {"", "/foo/bar/baz", "/foo/bar/baz/", "foo/bar/baz.txt", "foo/bar/baz.txt.gz"} |
12 | | -ref_filename = {"", "baz", "", "baz.txt", "baz.txt.gz"} |
| 11 | +in_filename = {"", "/a/b/c", "/a/b/c/", "a/b/c.txt", "a/b/c.txt.gz"} |
| 12 | +ref_filename = {"", "c", "", "c.txt", "c.txt.gz"} |
13 | 13 | dir_is_subdir |
14 | 14 | sub_is_subdir |
15 | 15 | ref_is_subdir |
|
30 | 30 | {"ab/cd", "/ef", "/ef"} ... |
31 | 31 | }; |
32 | 32 |
|
33 | | -in_suffix = {"", "/foo/bar/baz", "/foo/bar/baz/", "foo/bar/baz.txt", "foo/bar/baz.txt.gz", ".stat", ".stat.txt"} |
| 33 | +in_suffix = {"", "/a/b/c", "/a/b/c/", "a/b/c.txt", "a/b/c.txt.gz", ".stat", ".stat.txt"} |
34 | 34 | ref_suffix = {"", "", "", ".txt", ".gz", ".stat", ".txt"} |
35 | 35 |
|
36 | 36 | in_norm = {"", "a/..", "//a/b/", "/a/b/", "a/b/", "a/../c", "a/b/../c", "a/b/../../c", "a/b/../../c/..", ... |
@@ -226,13 +226,13 @@ function test_stem(tc) |
226 | 226 |
|
227 | 227 | tc.verifyEqual(stdlib.stem(""), "") |
228 | 228 |
|
229 | | -tc.verifyEqual(stdlib.stem("/foo/bar/baz"), "baz") |
230 | | -tc.verifyEqual(stdlib.stem("/foo/bar/baz/"), "") |
| 229 | +tc.verifyEqual(stdlib.stem("/a/b/c"), "c") |
| 230 | +tc.verifyEqual(stdlib.stem("/a/b/c/"), "") |
231 | 231 |
|
232 | | -tc.verifyEqual(stdlib.stem("foo/bar/baz/"), "") |
| 232 | +tc.verifyEqual(stdlib.stem("a/b/c/"), "") |
233 | 233 |
|
234 | | -tc.verifyEqual(stdlib.stem("foo/bar/baz.txt"), "baz") |
235 | | -tc.verifyEqual(stdlib.stem("foo/bar/baz.txt.gz"), "baz.txt") |
| 234 | +tc.verifyEqual(stdlib.stem("a/b/c.txt"), "c") |
| 235 | +tc.verifyEqual(stdlib.stem("a/b/c.txt.gz"), "c.txt") |
236 | 236 |
|
237 | 237 | end |
238 | 238 |
|
|
0 commit comments