Skip to content

Commit

Permalink
Fix tests for new match syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Dec 9, 2024
1 parent 0c26388 commit 03cba1f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion icu4c/source/i18n/messageformat2_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2022,7 +2022,7 @@ void Parser::parseSelectors(UErrorCode& status) {
return;
}

while (isWhitespace(peek()) || isBidiControl(peek()) isKeyStart(peek())) {
while (isWhitespace(peek()) || isBidiControl(peek()) || isKeyStart(peek())) {
parseOptionalWhitespace();
// Restore the precondition.
// Trailing whitespace is allowed.
Expand Down
10 changes: 5 additions & 5 deletions testdata/message2/bidi.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,39 +54,39 @@
{
"comment": "match-statement s variant *(o variant)",
"src": [".local $x = {1 :number}\n",
".match {$x}\n",
".match $x\n",
"1 {{one}}\n",
"\u061C * {{other}}"],
"exp": "one"
},
{
"comment": "match-statement s variant *(o variant)",
"src": [".local $x = {1 :number}",
".match {$x} \u061c",
".match $x \u061c",
"1 {{one}}",
"* {{other}}"],
"exp": "one"
},
{
"comment": "match-statement s variant *(o variant)",
"src": [".local $x = {1 :number}",
".match {$x}\u061c",
".match $x \u061c",
"1 {{one}}",
"* {{other}}"],
"exp": "one"
},
{
"comment": "variant = key *(s key) quoted-pattern",
"src": [".local $x = {1 :number} .local $y = {$x :number}",
".match {$x} {$y}",
".match $x $y\n",
"1 \u200E 1 {{one}}",
"* * {{other}}"],
"exp": "one"
},
{
"comment": "variant = key *(s key) quoted-pattern",
"src": [".local $x = {1 :number} .local $y = {$x :number}",
".match {$x} {$y}",
".match $x $y\n",
"1\u200E 1 {{one}}",
"* * {{other}}"],
"exp": "one"
Expand Down
2 changes: 1 addition & 1 deletion testdata/message2/matches-whitespace.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"tests": [
{ "src": ".local $one = {1 :string} .local $bar = {bar :string} .match $one $bar one * {{one}} * * {{other}}",
"exp": "one" },
"exp": "other" },
{ "src": ".local $foo = {foo :string} .local $bar = {bar :string} .match $foo $bar one * {{one}}* * {{other}}",
"exp": "other" },
{ "src": ".local $foo = {foo :string} .local $bar = {bar :string} .match $foo $bar one *{{one}} * * {{foo}}",
Expand Down

0 comments on commit 03cba1f

Please sign in to comment.