8000 Add tests for changes due to #885 (name/literal equality) · catamorphism/message-format-wg@dec91ac · GitHub
[go: up one dir, main page]

Skip to content

Commit dec91ac

Browse files
committed
Add tests for changes due to unicode-org#885 (name/literal equality)
1 parent e9fc136 commit dec91ac

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

test/tests/functions/string.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@
4444
"type": "unresolved-variable"
4545
}
4646
]
47+
},
48+
{
49+
"description": "NFC: keys are normalized",
50+
"src": ".local $x = {\u1E0A\u0323 :string} .match $x \u1E0A\u0323 {{Not normalized}} \u1E0C\u0307 {{Normalized}} * {{Wrong}}",
51+
"expErrors": [{"type": "duplicate-variant"}]
52+
},
53+
{
54+
"description": "NFC: keys are normalized",
55+
"src": ".local $x = {\u1E0A\u0323 :string} .match $x \u1E0C\u0307 {{Right}} * {{Wrong}}",
56+
"exp": "Right"
4757
}
4858
]
4959
}

test/tests/syntax.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,33 @@
697697
{
698698
"src": "{{trailing whitespace}} \n",
699699
"exp": "trailing whitespace"
700+
},
701+
{
702+
"description": "NFC: literals are not normalized",
703+
"src": "\u1E0A\u0323",
704+
"exp": "\u1E0A\u0323"
705+
},
706+
{
707+
"description": "NFC: variables are compared to each other as-if normalized; decl is non-normalized, use is",
708+
"src": ".local $\u0044\u0323\u0307 = {foo} {{{$\u1E0c\u0307}}}",
709+
"exp": "foo"
710+
},
711+
{
712+
"description": "NFC: variables are compared to each other as-if normalized; decl is normalized, use isn't",
713+
"src": ".local $\u1E0c\u0307 = {foo} {{{$\u0044\u0323\u0307}}}",
714+
"exp": "foo"
715+
},
716+
{
717+
"description": "NFC: variables are compared to each other as-if normalized; decl is normalized, use isn't",
718+
"src": ".input {$\u1E0c\u0307} {{{$\u0044\u0323\u0307}}}",
719+
"params": [{"name": "\u1E0c\u0307", "value": "foo"}],
720+
"exp": "foo"
721+
},
722+
{
723+
"description": "NFC: variables are compared to each other as-if normalized; decl is non-normalized, use is",
724+
"src": ".input {$\u0044\u0323\u0307} {{{$\u1E0c\u0307}}}",
725+
"params": [{"name": "\u0044\u0323\u0307", "value": "foo"}],
726+
"exp": "foo"
700727
}
701728
]
702729
}

0 commit comments

Comments
 (0)
0