diff --git a/test/language/line-terminators/S7.3_A2.3.js b/test/language/line-terminators/S7.3_A2.3.js deleted file mode 100644 index fb26e7e7a71..00000000000 --- a/test/language/line-terminators/S7.3_A2.3.js +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2009 the Sputnik authors. All rights reserved. -// This code is governed by the BSD license found in the LICENSE file. - -/*--- -info: LINE SEPARATOR (U+2028) within strings is not allowed -es5id: 7.3_A2.3 -description: Insert LINE SEPARATOR (\u2028) into string ----*/ - -assert.throws(SyntaxError, function() { - eval("'\u2028str\u2028ing\u2028'"); -}); diff --git a/test/language/line-terminators/line-separator-string-literal.js b/test/language/line-terminators/line-separator-string-literal.js new file mode 100644 index 00000000000..1bc706d995f --- /dev/null +++ b/test/language/line-terminators/line-separator-string-literal.js @@ -0,0 +1,11 @@ +// Copyright 2018 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-string-literals +description: > + LINE SEPARATOR (U+2028) is allowed within string literals. +features: [json-superset] +---*/ + +eval("'foo\u2028bar\u2028baz\u2028qux'"); diff --git a/test/language/line-terminators/paragraph-separator-string-literal.js b/test/language/line-terminators/paragraph-separator-string-literal.js new file mode 100644 index 00000000000..339a0de1435 --- /dev/null +++ b/test/language/line-terminators/paragraph-separator-string-literal.js @@ -0,0 +1,11 @@ +// Copyright 2018 Mathias Bynens. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. + +/*--- +esid: sec-literals-string-literals +description: > + PARAGRAPH SEPARATOR (U+2029) is allowed within string literals. +features: [json-superset] +---*/ + +eval("'foo\u2029bar\u2029baz\u2029qux'");