Skip to content

Commit 73cf46d

Browse files
committed
Make sure to test both NFC and NFD formats
1 parent ec50a88 commit 73cf46d

1 file changed

Lines changed: 9 additions & 5 deletions

File tree

lib/elixir/test/elixir/kernel/parser_test.exs

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,16 +1356,20 @@ defmodule Kernel.ParserTest do
13561356

13571357
# regression test: ǜ (should not suggest back the wrong character)
13581358
assert_syntax_error(
1359-
["nofile:1:4:", ~s/unexpected token: "#{"\u01DC"}" (column 4, code point U+01DC)/],
1360-
~c":fooǜ"
1359+
[
1360+
"nofile:1:4:",
1361+
~s/unexpected token: "ǜ" (column 4, code point U+01DC)/
1362+
],
1363+
[?:, ?f, ?o, ?o, 0x01DC, ?l, ?u, ?l]
13611364
)
13621365

1366+
# and we should not accept its decomposed form either
13631367
assert_syntax_error(
13641368
[
1365-
"nofile:1:7:",
1366-
~s/unexpected token: "ǜ" (column 7, code point U+01DC)/
1369+
"nofile:1:6:",
1370+
~s/unexpected token: "̀" (column 6, code point U+0300)/
13671371
],
1368-
~c":cōng_lǜ_green"
1372+
[?:, ?f, ?o, ?o, ?u, 0x0308, 0x0300, ?l, ?u, ?l]
13691373
)
13701374
end
13711375

0 commit comments

Comments
 (0)