mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
Add more tests for str_utf8_comp_confusable
Also check first string being shorter than second string. And check strings with equal and unequal prefix and suffix.
This commit is contained in:
parent
ab42651dc7
commit
dab6bbf4fd
|
@ -58,6 +58,15 @@ TEST(Str, Utf8CompConfusables)
|
|||
{
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("abc", "abc") == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("rn", "m") == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("m", "rn") == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("rna", "ma") == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("ma", "rna") == 0);
|
||||
EXPECT_FALSE(str_utf8_comp_confusable("mA", "rna") == 0);
|
||||
EXPECT_FALSE(str_utf8_comp_confusable("ma", "rnA") == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("arn", "am") == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("am", "arn") == 0);
|
||||
EXPECT_FALSE(str_utf8_comp_confusable("Am", "arn") == 0);
|
||||
EXPECT_FALSE(str_utf8_comp_confusable("am", "Arn") == 0);
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("l", "ӏ") == 0); // CYRILLIC SMALL LETTER PALOCHKA
|
||||
EXPECT_TRUE(str_utf8_comp_confusable("i", "¡") == 0); // INVERTED EXCLAMATION MARK
|
||||
EXPECT_FALSE(str_utf8_comp_confusable("o", "x") == 0);
|
||||
|
|
Loading…
Reference in a new issue