diff options
Diffstat (limited to 'testes/pm.lua')
| -rw-r--r-- | testes/pm.lua | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/testes/pm.lua b/testes/pm.lua index cdcf3bec..1afaccf6 100644 --- a/testes/pm.lua +++ b/testes/pm.lua | |||
| @@ -237,18 +237,6 @@ checkerror("invalid capture index %%0", string.gsub, "alo", "(%0)", "a") | |||
| 237 | checkerror("invalid capture index %%1", string.gsub, "alo", "(%1)", "a") | 237 | checkerror("invalid capture index %%1", string.gsub, "alo", "(%1)", "a") |
| 238 | checkerror("invalid use of '%%'", string.gsub, "alo", ".", "%x") | 238 | checkerror("invalid use of '%%'", string.gsub, "alo", ".", "%x") |
| 239 | 239 | ||
| 240 | -- bug since 2.5 (C-stack overflow) | ||
| 241 | do | ||
| 242 | local function f (size) | ||
| 243 | local s = string.rep("a", size) | ||
| 244 | local p = string.rep(".?", size) | ||
| 245 | return pcall(string.match, s, p) | ||
| 246 | end | ||
| 247 | local r, m = f(80) | ||
| 248 | assert(r and #m == 80) | ||
| 249 | r, m = f(200000) | ||
| 250 | assert(not r and string.find(m, "too complex")) | ||
| 251 | end | ||
| 252 | 240 | ||
| 253 | if not _soft then | 241 | if not _soft then |
| 254 | print("big strings") | 242 | print("big strings") |
