Skip to content

Commit 5e93b03

Browse files
committed
Add unit test
1 parent cf6ed6f commit 5e93b03

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

test/Function/bug_os17698041.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//-------------------------------------------------------------------------------------------------------
2+
// Copyright (C) Microsoft. All rights reserved.
3+
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
4+
//-------------------------------------------------------------------------------------------------------
5+
6+
// Should not crash with switches:
7+
// -off:deferparse -force:redeferral -collectgarbage -parserstatecache -useparserstatecache
8+
9+
function test() { }
10+
11+
test();
12+
CollectGarbage();
13+
test();
14+
15+
console.log('pass');

test/Function/rlexe.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -449,4 +449,10 @@
449449
<compile-flags>-force:deferparse -force:redeferral</compile-flags>
450450
</default>
451451
</test>
452+
<test>
453+
<default>
454+
<files>bug_os17698041.js</files>
455+
<compile-flags>-off:deferparse -force:redeferral -collectgarbage -parserstatecache -useparserstatecache</compile-flags>
456+
</default>
457+
</test>
452458
</regress-exe>

0 commit comments

Comments
 (0)