diff options
Diffstat (limited to 'src/pkg/strings/strings_test.go')
-rw-r--r-- | src/pkg/strings/strings_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/pkg/strings/strings_test.go b/src/pkg/strings/strings_test.go index fdf192db6..eeb64f1e8 100644 --- a/src/pkg/strings/strings_test.go +++ b/src/pkg/strings/strings_test.go @@ -341,6 +341,28 @@ func TestToUpper(t *testing.T) { runStringTests(t, ToUpper, "ToUpper", upperTest func TestToLower(t *testing.T) { runStringTests(t, ToLower, "ToLower", lowerTests) } +func TestSpecialCase(t *testing.T) { + lower := "abcçdefgğhıijklmnoöprsştuüvyz" + upper := "ABCÇDEFGĞHIİJKLMNOÖPRSŞTUÜVYZ" + u := ToUpperSpecial(unicode.TurkishCase, upper) + if u != upper { + t.Errorf("Upper(upper) is %s not %s", u, upper) + } + u = ToUpperSpecial(unicode.TurkishCase, lower) + if u != upper { + t.Errorf("Upper(lower) is %s not %s", u, upper) + } + l := ToLowerSpecial(unicode.TurkishCase, lower) + if l != lower { + t.Errorf("Lower(lower) is %s not %s", l, lower) + } + l = ToLowerSpecial(unicode.TurkishCase, upper) + if l != lower { + t.Errorf("Lower(upper) is %s not %s", l, lower) + } +} + + func TestTrimSpace(t *testing.T) { runStringTests(t, TrimSpace, "TrimSpace", trimSpaceTests) } func equal(m string, s1, s2 string, t *testing.T) bool { |