Extend tests of str_has_cc with other control characters

The character `\n` was checked redundantly. Now more obscure control characters are also checked instead.
This commit is contained in:
Robert Müller 2022-09-29 00:10:39 +02:00
parent 98848cde70
commit 8c1735cda6

View file

@ -554,7 +554,6 @@ TEST(Str, HasCc)
EXPECT_FALSE(str_has_cc("a"));
EXPECT_FALSE(str_has_cc("Merhaba dünya!"));
EXPECT_TRUE(str_has_cc("\n"));
EXPECT_TRUE(str_has_cc("\n"));
EXPECT_TRUE(str_has_cc("\r"));
EXPECT_TRUE(str_has_cc("\t"));
@ -562,6 +561,10 @@ TEST(Str, HasCc)
EXPECT_TRUE(str_has_cc("a\rb"));
EXPECT_TRUE(str_has_cc("\tb"));
EXPECT_TRUE(str_has_cc("\n\n"));
EXPECT_TRUE(str_has_cc("\x1C"));
EXPECT_TRUE(str_has_cc("\x1D"));
EXPECT_TRUE(str_has_cc("\x1E"));
EXPECT_TRUE(str_has_cc("\x1F"));
}
TEST(Str, CompFilename)