mirror of https://github.com/svaarala/duktape.git
Sami Vaarala
4 years ago
4 changed files with 47 additions and 0 deletions
@ -0,0 +1,17 @@ |
|||
// Cover empty search pattern and empty input.
|
|||
|
|||
/*=== |
|||
foo |
|||
xfoo |
|||
fo |
|||
fxo |
|||
===*/ |
|||
|
|||
try { |
|||
print('foo'.replace('', '')); |
|||
print('foo'.replace('', 'x')); |
|||
print('foo'.replace('o', '')); |
|||
print('foo'.replace('o', 'x')); |
|||
} catch (e) { |
|||
print(e.stack || e); |
|||
} |
@ -0,0 +1,22 @@ |
|||
/* |
|||
* Reported by https://github.com/bzyo.
|
|||
*/ |
|||
|
|||
/*=== |
|||
443016350 |
|||
7 |
|||
done |
|||
===*/ |
|||
|
|||
function main() { |
|||
var v2 = "EPSILON".repeat(63288050); |
|||
print(v2.length); |
|||
var v3 = "EPSILON".replace(v2); |
|||
print(v3.length); |
|||
} |
|||
try { |
|||
main(); |
|||
} catch (e) { |
|||
print(e.stack || e); |
|||
} |
|||
print('done'); |
Loading…
Reference in new issue