mirror of https://github.com/svaarala/duktape.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
548 B
29 lines
548 B
/*
|
|
* Instead of a clean error, causes an assert failure in Duktape 0.11.0.
|
|
*
|
|
* Without asserts the code works, no valgrind issues. The assert is:
|
|
*
|
|
* PANIC 54: assertion failed: t2 + DUK__WEEKDAY_MOD_ADDER >= 0 (duk_bi_date.c:1043) (segfaulting on purpose)
|
|
*/
|
|
|
|
/*===
|
|
about to set year
|
|
year set ok
|
|
Invalid Date
|
|
done
|
|
===*/
|
|
|
|
function test() {
|
|
var d = new Date();
|
|
print('about to set year');
|
|
d.setFullYear(123912921921321);
|
|
print('year set ok');
|
|
print(d);
|
|
}
|
|
|
|
try {
|
|
test();
|
|
} catch (e) {
|
|
print(e);
|
|
}
|
|
print('done');
|
|
|