Compare commits

..

2 Commits

Author SHA1 Message Date
dirkf
65ea8e014a
Again but better 2024-12-12 16:32:25 +00:00
dirkf
803210d287
Unicode matching too hard for 3.2? 2024-12-12 16:26:57 +00:00

View File

@ -516,7 +516,8 @@ class TestJSInterpreter(unittest.TestCase):
['t', 'e', 's', 't']) ['t', 'e', 's', 't'])
self._test('function f(){return "t-e-s-t".split(/[es-]+/)}', self._test('function f(){return "t-e-s-t".split(/[es-]+/)}',
['t', 't']) ['t', 't'])
# from MDN: surrogate pairs aren't handled: case 1 fails # from MDN: surrogate pairs aren't handled: case 1 fails, and case 2 beats Py3.2
if sys.version_info >= (2, 6) and not ((3, 0) <= sys.version_info < (3, 3)):
# self._test('function f(){return "😄😄".split(/(?:)/)}', # self._test('function f(){return "😄😄".split(/(?:)/)}',
# ['\ud83d', '\ude04', '\ud83d', '\ude04']) # ['\ud83d', '\ude04', '\ud83d', '\ude04'])
self._test('function f(){return "😄😄".split(/(?:)/u)}', self._test('function f(){return "😄😄".split(/(?:)/u)}',