Skip to content

Commit

Permalink
Merge pull request #1544 from gibson042/proposal-json-superset
Browse files Browse the repository at this point in the history
Tests for proposal-json-superset
  • Loading branch information
leobalter authored May 8, 2018
2 parents c49de8a + dbc0c6b commit 524e8e4
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 25 deletions.
4 changes: 4 additions & 0 deletions features.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,10 @@ numeric-separator-literal
String.prototype.matchAll
Symbol.matchAll

# ECMAScript ⊃ JSON
# https://github.com/tc39/proposal-json-superset
json-superset

# Intl.Locale
# https://github.com/tc39/proposal-intl-locale
Intl.Locale
Expand Down
12 changes: 0 additions & 12 deletions test/language/line-terminators/S7.3_A2.3.js

This file was deleted.

13 changes: 0 additions & 13 deletions test/language/line-terminators/S7.3_A2.4.js

This file was deleted.

17 changes: 17 additions & 0 deletions test/language/literals/string/line-separator-eval.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (C) 2018 Richard Gibson. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-literals-string-literals
description: >
U+2028 LINE SEPARATOR can appear in string literals (eval code).
info: |
11.8.4 String Literals
All code points may appear literally in a string literal except for the
closing quote code points, U+005C (REVERSE SOLIDUS), U+000D (CARRIAGE RETURN),
and U+000A (LINE FEED).
features: [json-superset]
---*/

assert.sameValue(eval("'\u2028'"), "\u2028");
18 changes: 18 additions & 0 deletions test/language/literals/string/line-separator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright (C) 2018 Richard Gibson. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-literals-string-literals
description: >
U+2028 LINE SEPARATOR can appear in string literals.
info: |
11.8.4 String Literals
All code points may appear literally in a string literal except for the
closing quote code points, U+005C (REVERSE SOLIDUS), U+000D (CARRIAGE RETURN),
and U+000A (LINE FEED).
features: [json-superset]
---*/

// U+2028 in strings; UTF8(0x2028) = 0xE2 0x80 0xA8
assert.sameValue("
", "\u2028");
17 changes: 17 additions & 0 deletions test/language/literals/string/paragraph-separator-eval.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Copyright (C) 2018 Richard Gibson. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-literals-string-literals
description: >
U+2029 PARAGRAPH SEPARATOR can appear in string literals (eval code).
info: |
11.8.4 String Literals
All code points may appear literally in a string literal except for the
closing quote code points, U+005C (REVERSE SOLIDUS), U+000D (CARRIAGE RETURN),
and U+000A (LINE FEED).
features: [json-superset]
---*/

assert.sameValue(eval("'\u2029'"), "\u2029");
18 changes: 18 additions & 0 deletions test/language/literals/string/paragraph-separator.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// Copyright (C) 2018 Richard Gibson. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
esid: sec-literals-string-literals
description: >
U+2029 PARAGRAPH SEPARATOR can appear in string literals.
info: |
11.8.4 String Literals
All code points may appear literally in a string literal except for the
closing quote code points, U+005C (REVERSE SOLIDUS), U+000D (CARRIAGE RETURN),
and U+000A (LINE FEED).
features: [json-superset]
---*/

// U+2029 in strings; UTF8(0x2029) = 0xE2 0x80 0xA9
assert.sameValue("
", "\u2029");

0 comments on commit 524e8e4

Please sign in to comment.