Skip to content

Commit 524e2b3

Browse files
authored
anagram: Add unicode tests (#2366)
1 parent 566ee0c commit 524e2b3

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

exercises/anagram/canonical-data.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,29 @@
216216
"candidates": ["LISTEN", "Silent"]
217217
},
218218
"expected": ["Silent"]
219+
},
220+
{
221+
"uuid": "a6854f66-eec1-4afd-a137-62ef2870c051",
222+
"description": "handles case of greek letters",
223+
"scenarios": ["unicode"],
224+
"property": "findAnagrams",
225+
"input": {
226+
"subject": "ΑΒΓ",
227+
"candidates": ["ΒΓΑ", "ΒΓΔ", "γβα", "αβγ"]
228+
},
229+
"expected": ["ΒΓΑ", "γβα"]
230+
},
231+
{
232+
"uuid": "fd3509e5-e3ba-409d-ac3d-a9ac84d13296",
233+
"description": "different characters may have the same bytes",
234+
"comments": ["a⬂ => 61 E2 AC 82", "€a => E2 82 AC 61"],
235+
"scenarios": ["unicode"],
236+
"property": "findAnagrams",
237+
"input": {
238+
"subject": "a⬂",
239+
"candidates": ["€a"]
240+
},
241+
"expected": []
219242
}
220243
]
221244
}

0 commit comments

Comments
 (0)