Skip to content

Commit df66341

Browse files
authored
Sync anagram tests (#429)
1 parent 20d1b3b commit df66341

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

exercises/practice/anagram/.meta/tests.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,9 @@ include = false
7777
[33d3f67e-fbb9-49d3-a90e-0beb00861da7]
7878
description = "words other than themselves can be anagrams"
7979
reimplements = "a0705568-628c-4b55-9798-82e4acde51ca"
80+
81+
[a6854f66-eec1-4afd-a137-62ef2870c051]
82+
description = "handles case of greek letters"
83+
84+
[fd3509e5-e3ba-409d-ac3d-a9ac84d13296]
85+
description = "different characters may have the same bytes"

exercises/practice/anagram/anagram-test.rkt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@
9797
(test-equal? "words other than themselves can be anagrams"
9898
(anagrams-for "LISTEN"
9999
'("LISTEN" "Silent"))
100-
'("Silent"))))
100+
'("Silent"))
101+
102+
(test-equal? "handles case of greek letters"
103+
(sort (anagrams-for "ΑΒΓ"
104+
'("ΒΓΑ" "ΒΓΔ" "γβα" "αβγ"))
105+
string<?)
106+
'("ΒΓΑ" "γβα"))
107+
108+
(test-equal? "different characters may have the same bytes"
109+
(anagrams-for "a⬂"
110+
'("€a"))
111+
'())))
101112

102113
(run-tests suite))

0 commit comments

Comments
 (0)