mirror of https://github.com/tc39/test262.git
Add tests for ZWJ and ZWNJ in identifiers (#2723)
This commit is contained in:
parent
5f99d05c6a
commit
e73054f75e
|
@ -0,0 +1,16 @@
|
|||
// Copyright (C) 2020 Adam Kluball. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
author: Adam Kluball
|
||||
esid: sec-names-and-keywords
|
||||
description: zero width joiner and zero width non-joiner are valid identifier parts
|
||||
---*/
|
||||
|
||||
var $ = 1;
|
||||
var $\u200D = 2;
|
||||
var $\u200C = 3;
|
||||
|
||||
assert.sameValue($, 1);
|
||||
assert.sameValue($\u200D, 2);
|
||||
assert.sameValue($\u200C, 3);
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (C) 2020 Adam Kluball. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
author: Adam Kluball
|
||||
esid: sec-names-and-keywords
|
||||
description: zero width joiner is not a valid identifier start
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var \u200D;
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright (C) 2020 Adam Kluball. All rights reserved.
|
||||
// This code is governed by the BSD license found in the LICENSE file.
|
||||
|
||||
/*---
|
||||
author: Adam Kluball
|
||||
esid: sec-names-and-keywords
|
||||
description: zero width non-joiner is not a valid identifier start
|
||||
negative:
|
||||
phase: parse
|
||||
type: SyntaxError
|
||||
---*/
|
||||
|
||||
$DONOTEVALUATE();
|
||||
|
||||
var \u200C;
|
Loading…
Reference in New Issue