[CString.StripControls] Srip bg colours when we reset fg

This commit is contained in:
Kyle Fuller committed 2016-04-11 22:09:40 +01:00
1 parent ddec5c27ba
commit 032f00732a
2 files changed
+9 -1

No files matched your search

+8
View File
@@ -263,3 +263,11 @@ TEST(StringTest, Contains) {
EXPECT_FALSE(
CString("Hello, I'm Bob").Contains("i'm bob", CString::CaseSensitive));
}
TEST(StringTest, StripControls) {
// Strips reset colours
EXPECT_EQ(CString("\x03test").StripControls(), "test");
// Strips reset foreground and set new background colour
EXPECT_EQ(CString("\x03,03test").StripControls(), "test");
}