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 92ef532f5..3c4391c4a 100644
--- a/test/test_jsinterp.py
+++ b/test/test_jsinterp.py
@@ -392,6 +392,11 @@ class TestJSInterpreter(unittest.TestCase):
''')
self.assertEqual(jsi.call_function('x').pattern, r',][}",],()}(\[)')
+ jsi = JSInterpreter(R'''
+ function x() { let a=[/[)\\]/]; return a[0]; }
+ ''')
+ 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)