diff options
Diffstat (limited to '')
-rw-r--r-- | testes/strings.lua | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/testes/strings.lua b/testes/strings.lua index 1b2b570e..2540fdef 100644 --- a/testes/strings.lua +++ b/testes/strings.lua | |||
@@ -163,11 +163,16 @@ do -- tests for '%p' format | |||
163 | assert(string.format("%p", 4) == null) | 163 | assert(string.format("%p", 4) == null) |
164 | assert(string.format("%p", print) ~= null) | 164 | assert(string.format("%p", print) ~= null) |
165 | assert(string.format("%p", coroutine.running()) ~= null) | 165 | assert(string.format("%p", coroutine.running()) ~= null) |
166 | assert(string.format("%p", {}) ~= string.format("%p", {})) | 166 | do |
167 | local t1 = {}; local t2 = {} | ||
168 | assert(string.format("%p", t1) ~= string.format("%p", t2)) | ||
169 | end | ||
167 | assert(string.format("%p", string.rep("a", 10)) == | 170 | assert(string.format("%p", string.rep("a", 10)) == |
168 | string.format("%p", string.rep("a", 10))) -- short strings | 171 | string.format("%p", string.rep("a", 10))) -- short strings |
169 | assert(string.format("%p", string.rep("a", 300)) ~= | 172 | do -- long strings |
170 | string.format("%p", string.rep("a", 300))) -- long strings | 173 | local s1 = string.rep("a", 300); local s2 = string.rep("a", 300) |
174 | assert(string.format("%p", s1) ~= string.format("%p", s2)) | ||
175 | end | ||
171 | assert(#string.format("%90p", {}) == 90) | 176 | assert(#string.format("%90p", {}) == 90) |
172 | end | 177 | end |
173 | 178 | ||