blob: be95d6c1de5a4e04a58af2dd048b2d4367b3d67f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
(load "../common")
(mtest
(short-suffix 42) :error
(short-suffix #\a) :error
(short-suffix "") nil
(short-suffix "" 0) 0
(short-suffix "a") nil
(short-suffix "a" 0) 0
(short-suffix ".") ""
(short-suffix "a.") ""
(short-suffix "a.b.") ""
(short-suffix ".c") "c"
(short-suffix "a.c") "c"
(short-suffix "a.b.c") "c"
(short-suffix "foo.txt.gz") "gz"
(short-suffix ".gz") "gz")
(mtest
(long-suffix 42) :error
(long-suffix #\a) :error
(long-suffix "") nil
(long-suffix "" 0) 0
(long-suffix "a") nil
(long-suffix "a" 0) 0
(long-suffix ".") ""
(long-suffix "a.") ""
(long-suffix "a.b.") "b."
(long-suffix ".c") "c"
(long-suffix "a.c") "c"
(long-suffix "a.b.c") "b.c"
(long-suffix "foo.txt.gz") "txt.gz"
(long-suffix ".gz") "gz"
(long-suffix ".txt.gz") "txt.gz")
|