diff options
Diffstat (limited to 'testes/strings.lua')
-rw-r--r-- | testes/strings.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/testes/strings.lua b/testes/strings.lua index 587a0e06..88480924 100644 --- a/testes/strings.lua +++ b/testes/strings.lua | |||
@@ -94,6 +94,11 @@ assert(string.char(string.byte("\xe4l\0ķu", 1, -1)) == "\xe4l\0ķu") | |||
94 | assert(string.char(string.byte("\xe4l\0ķu", 1, 0)) == "") | 94 | assert(string.char(string.byte("\xe4l\0ķu", 1, 0)) == "") |
95 | assert(string.char(string.byte("\xe4l\0ķu", -10, 100)) == "\xe4l\0ķu") | 95 | assert(string.char(string.byte("\xe4l\0ķu", -10, 100)) == "\xe4l\0ķu") |
96 | 96 | ||
97 | checkerror("out of range", string.char, 256) | ||
98 | checkerror("out of range", string.char, -1) | ||
99 | checkerror("out of range", string.char, math.maxinteger) | ||
100 | checkerror("out of range", string.char, math.mininteger) | ||
101 | |||
97 | assert(string.upper("ab\0c") == "AB\0C") | 102 | assert(string.upper("ab\0c") == "AB\0C") |
98 | assert(string.lower("\0ABCc%$") == "\0abcc%$") | 103 | assert(string.lower("\0ABCc%$") == "\0abcc%$") |
99 | assert(string.rep('teste', 0) == '') | 104 | assert(string.rep('teste', 0) == '') |