From 933fb6c9474db8e12cea40afe1f1d312e6ac717c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A1s=20B=20Nagy?= <20251272+BNAndras@users.noreply.github.com> Date: Fri, 9 Jan 2026 19:04:10 -0800 Subject: [PATCH] Sync `anagram` tests --- exercises/practice/anagram/.meta/tests.toml | 11 +++++++++++ exercises/practice/anagram/AnagramTests.fs | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/exercises/practice/anagram/.meta/tests.toml b/exercises/practice/anagram/.meta/tests.toml index 8a3708bbf..4d9056270 100644 --- a/exercises/practice/anagram/.meta/tests.toml +++ b/exercises/practice/anagram/.meta/tests.toml @@ -46,6 +46,11 @@ description = "detects anagrams using case-insensitive possible matches" [7cc195ad-e3c7-44ee-9fd2-d3c344806a2c] description = "does not detect an anagram if the original word is repeated" +include = false + +[630abb71-a94e-4715-8395-179ec1df9f91] +description = "does not detect an anagram if the original word is repeated" +reimplements = "7cc195ad-e3c7-44ee-9fd2-d3c344806a2c" [9878a1c9-d6ea-4235-ae51-3ea2befd6842] description = "anagrams must use all letters exactly once" @@ -73,3 +78,9 @@ include = false [33d3f67e-fbb9-49d3-a90e-0beb00861da7] description = "words other than themselves can be anagrams" reimplements = "a0705568-628c-4b55-9798-82e4acde51ca" + +[a6854f66-eec1-4afd-a137-62ef2870c051] +description = "handles case of greek letters" + +[fd3509e5-e3ba-409d-ac3d-a9ac84d13296] +description = "different characters may have the same bytes" diff --git a/exercises/practice/anagram/AnagramTests.fs b/exercises/practice/anagram/AnagramTests.fs index 41c7939c9..7ed793a56 100644 --- a/exercises/practice/anagram/AnagramTests.fs +++ b/exercises/practice/anagram/AnagramTests.fs @@ -57,7 +57,7 @@ let ``Detects anagrams using case-insensitive possible matches`` () = [] let ``Does not detect an anagram if the original word is repeated`` () = - let candidates = ["go Go GO"] + let candidates = ["goGoGO"] findAnagrams candidates "go" |> should be Empty [] @@ -85,3 +85,13 @@ let ``Words other than themselves can be anagrams`` () = let candidates = ["LISTEN"; "Silent"] findAnagrams candidates "LISTEN" |> should equal ["Silent"] +[] +let ``Handles case of greek letters`` () = + let candidates = ["ΒΓΑ"; "ΒΓΔ"; "γβα"; "αβγ"] + findAnagrams candidates "ΑΒΓ" |> should equal ["ΒΓΑ"; "γβα"] + +[] +let ``Different characters may have the same bytes`` () = + let candidates = ["€a"] + findAnagrams candidates "a⬂" |> should be Empty +