diff options
Diffstat (limited to 'tests/utils_tests/test_jslex.py')
| -rw-r--r-- | tests/utils_tests/test_jslex.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/utils_tests/test_jslex.py b/tests/utils_tests/test_jslex.py index 0963dd0f16..ee13eb4d64 100644 --- a/tests/utils_tests/test_jslex.py +++ b/tests/utils_tests/test_jslex.py @@ -72,7 +72,7 @@ class JsTokensTest(SimpleTestCase): (r"a=/\//,1", ["id a", "punct =", r"regex /\//", "punct ,", "dnum 1"]), # next two are from https://www-archive.mozilla.org/js/language/js20-2002-04/rationale/syntax.html#regular-expressions # NOQA ( - """for (var x = a in foo && "</x>" || mot ? z:/x:3;x<5;y</g/i) {xyz(x++);}""", + 'for (var x = a in foo && "</x>" || mot ? z:/x:3;x<5;y</g/i) {xyz(x++);}', [ "keyword for", "punct (", @@ -104,7 +104,7 @@ class JsTokensTest(SimpleTestCase): ], ), ( - """for (var x = a in foo && "</x>" || mot ? z/x:3;x<5;y</g/i) {xyz(x++);}""", + 'for (var x = a in foo && "</x>" || mot ? z/x:3;x<5;y</g/i) {xyz(x++);}', [ "keyword for", "punct (", @@ -240,7 +240,8 @@ class JsTokensTest(SimpleTestCase): ], ), ( - r""" this._js = "e.str(\"" + this.value.replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\")"; """, + r' this._js = "e.str(\"" + this.value.replace(/\\/g, "\\\\")' + r'.replace(/"/g, "\\\"") + "\")"; ', [ "keyword this", "punct .", |
