diff options
Diffstat (limited to '')
-rw-r--r-- | testes/strings.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/testes/strings.lua b/testes/strings.lua index 0e7874bf..aa039c4f 100644 --- a/testes/strings.lua +++ b/testes/strings.lua | |||
@@ -167,8 +167,11 @@ do -- tests for '%p' format | |||
167 | local t1 = {}; local t2 = {} | 167 | local t1 = {}; local t2 = {} |
168 | assert(string.format("%p", t1) ~= string.format("%p", t2)) | 168 | assert(string.format("%p", t1) ~= string.format("%p", t2)) |
169 | end | 169 | end |
170 | assert(string.format("%p", string.rep("a", 10)) == | 170 | do -- short strings |
171 | string.format("%p", string.rep("a", 10))) -- short strings | 171 | local s1 = string.rep("a", 10) |
172 | local s2 = string.rep("a", 10) | ||
173 | assert(string.format("%p", s1) == string.format("%p", s2)) | ||
174 | end | ||
172 | do -- long strings | 175 | do -- long strings |
173 | local s1 = string.rep("a", 300); local s2 = string.rep("a", 300) | 176 | local s1 = string.rep("a", 300); local s2 = string.rep("a", 300) |
174 | assert(string.format("%p", s1) ~= string.format("%p", s2)) | 177 | assert(string.format("%p", s1) ~= string.format("%p", s2)) |