Skip to content

Commit c847416

Browse files
committed
anagram: Add unicode tests
1 parent 70abf75 commit c847416

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

exercises/anagram/canonical-data.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,32 @@
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": [
235+
"a⬂ => 61 E2 AC 82",
236+
"€a => E2 82 AC 61"
237+
],
238+
"scenarios": ["unicode"],
239+
"property": "findAnagrams",
240+
"input": {
241+
"subject": "a⬂",
242+
"candidates": ["€a"]
243+
},
244+
"expected": []
219245
}
220246
]
221247
}

0 commit comments

Comments
 (0)