forked from facebook/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathunicode-invalid.js
More file actions
31 lines (25 loc) · 848 Bytes
/
unicode-invalid.js
File metadata and controls
31 lines (25 loc) · 848 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// RUN: (! %hermes %s 2>&1 ) | %FileCheck %s
// Verify that invalid Unicode identifiers cause errors
// to be emitted.
͛xyz = false;
// Starts with a combining mark
// CHECK: error: unrecognized Unicode character \u35b
// CHECK-NEXT: ͛xyz = false;
᥊abc = false;
// Starts with a digit
// CHECK: error: unrecognized Unicode character \u194a
// CHECK-NEXT: ᥊abc = false;
͋de = false;
// Starts with a digit with combining mark
// CHECK: error: unrecognized Unicode character \u34b
// CHECK-NEXT: ͋de = false;
͓fg = false;
// Starts with connector puncutation
// CHECK: error: unrecognized Unicode character \u353
// CHECK-NEXT: ͓fg = false;