From cc674b28e80da9f04624fe29b4b23f0fd9b04629 Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Mon, 11 Apr 2016 21:57:19 +0100 Subject: [PATCH] [CString.StripControls] Improve test coverage formatting --- test/StringTest.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/StringTest.cpp b/test/StringTest.cpp index b52406cb..e96ccdf5 100644 --- a/test/StringTest.cpp +++ b/test/StringTest.cpp @@ -270,4 +270,22 @@ TEST(StringTest, StripControls) { // Strips reset foreground and set new background colour EXPECT_EQ(CString("\x03,03test").StripControls(), "test"); + + // Strips foreground and background colour + EXPECT_EQ(CString("\x03\x30,03test").StripControls(), "test"); + + // Strips reset + EXPECT_EQ(CString("\x0Ftest").StripControls(), "test"); + + // Strips reverse + EXPECT_EQ(CString("\x12test").StripControls(), "test"); + + // Strips bold + EXPECT_EQ(CString("\x02test").StripControls(), "test"); + + // Strips italics + EXPECT_EQ(CString("\x16test").StripControls(), "test"); + + // Strips underline + EXPECT_EQ(CString("\x1Ftest").StripControls(), "test"); }