diff options
Diffstat (limited to 'internal/norm/norm_test.go')
| -rw-r--r-- | internal/norm/norm_test.go | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/internal/norm/norm_test.go b/internal/norm/norm_test.go index a165b32..dfae915 100644 --- a/internal/norm/norm_test.go +++ b/internal/norm/norm_test.go @@ -75,8 +75,9 @@ func TestFoldASCIINoAlloc(t *testing.T) { } // TestFoldMappedSource: a part of the folded text leads back to the original -// characters it came from, widened to whole characters - so a capture can be -// written with its diacritics. +// characters it came from, widened to whole characters and to the combining +// marks that follow them (a decomposed name, plan 11 review L5) - so a +// capture can be written with its diacritics. func TestFoldMappedSource(t *testing.T) { cases := []struct { in, folded string @@ -86,8 +87,10 @@ func TestFoldMappedSource(t *testing.T) { {"Łódź-faktura.pdf", "Lodz-faktura.pdf", 0, 4, "Łódź"}, {"Łódź-faktura.pdf", "Lodz-faktura.pdf", 5, 12, "faktura"}, {"straße", "strasse", 4, 5, "ß"}, - {"áb", "ab", 0, 1, "a"}, - {"áb", "ab", 1, 2, "b"}, + {"a\u0301b", "ab", 0, 1, "a\u0301"}, + {"e\u0301-x.pdf", "e-x.pdf", 0, 1, "e\u0301"}, + {"\u0141o\u0301dz\u0301-f.pdf", "Lodz-f.pdf", 0, 4, "\u0141o\u0301dz\u0301"}, + {"a\u0301b", "ab", 1, 2, "b"}, {"\xff\xfeé", "�e", 0, 3, "\xff\xfe"}, {"plain.txt", "plain.txt", 0, 5, "plain"}, {"Łódź", "Lodz", 2, 2, ""}, |
