aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_jsinterp.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_jsinterp.py')
-rw-r--r--test/test_jsinterp.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/test_jsinterp.py b/test/test_jsinterp.py
index 4b6e22bac..0cdf726fb 100644
--- a/test/test_jsinterp.py
+++ b/test/test_jsinterp.py
@@ -352,6 +352,11 @@ class TestJSInterpreter(unittest.TestCase):
''')
self.assertEqual(jsi.call_function('x').flags & re.I, re.I)
+ jsi = JSInterpreter('''
+ function x() { let a=/,][}",],()}(\[)/; return a; }
+ ''')
+ self.assertEqual(jsi.call_function('x').pattern, r',][}",],()}(\[)')
+
def test_char_code_at(self):
jsi = JSInterpreter('function x(i){return "test".charCodeAt(i)}')
self.assertEqual(jsi.call_function('x', 0), 116)