diff options
Diffstat (limited to 'tests/015')
-rw-r--r-- | tests/015/trim.expected | 0 | ||||
-rw-r--r-- | tests/015/trim.tl | 41 |
2 files changed, 41 insertions, 0 deletions
diff --git a/tests/015/trim.expected b/tests/015/trim.expected new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/tests/015/trim.expected diff --git a/tests/015/trim.tl b/tests/015/trim.tl new file mode 100644 index 00000000..da1fc0c1 --- /dev/null +++ b/tests/015/trim.tl @@ -0,0 +1,41 @@ +(load "../common") + +(mtest + (trim-left "" "") "" + (trim-left 1 "") :error + (trim-left "" 1) :error + (trim-left 1 1) :error) + +(mtest + (trim-left "" "abc") "abc" + (trim-left "a" "abc") "bc" + (trim-left "ab" "abc") "c" + (trim-left "abc" "abc") "" + (trim-left "abcd" "abc") "abc" + (trim-left "z" "abc") "abc") + +(mtest + (trim-left #// "abc") "abc" + (trim-left #/./ "abc") "bc" + (trim-left #/../ "abc") "c" + (trim-left #/.../ "abc") "" + (trim-left #/.*/ "abc") "" + (trim-left #/..../ "abc") "abc" + (trim-left #/z/ "abc") "abc") + +(mtest + (trim-right "" "abc") "abc" + (trim-right "c" "abc") "ab" + (trim-right "bc" "abc") "a" + (trim-right "abc" "abc") "" + (trim-right "xabc" "abc") "abc" + (trim-right "z" "abc") "abc") + +(mtest + (trim-right #// "abc") "abc" + (trim-right #/./ "abc") "ab" + (trim-right #/../ "abc") "a" + (trim-right #/.../ "abc") "" + (trim-right #/.*/ "abc") "" + (trim-right #/..../ "abc") "abc" + (trim-right #/z/ "abc") "abc") |