[CString.StripControls] Srip bg colours when we reset fg
This commit is contained in:
1 parent
ddec5c27ba
commit
032f00732a
2 files changed
+9
-1
No files matched your search
@@ -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");
|
||||
}
|
||||
Reference in new issue
Block a user