From 65e83a58c7d3e09a83f77eb897df3b73f1bae4f8 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Tue, 22 Mar 2016 22:43:11 +0000 Subject: [PATCH] Fixed spacing between include files and first test. --- source/tests/xestiaab_common.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/source/tests/xestiaab_common.h b/source/tests/xestiaab_common.h index 6dbfb9f..f373df0 100644 --- a/source/tests/xestiaab_common.h +++ b/source/tests/xestiaab_common.h @@ -22,6 +22,7 @@ #include "../common/mime.h" #include "../common/svrblist.h" #include "../common/textprocessing.h" + TEST(CommonFunctions, GetUserDir){ // Run the unit tests depending on the operating system being used. @@ -273,6 +274,24 @@ TEST(CommonFunctions, EscapeString){ TEST(CommonFunctions, CaptureString){ + // Test the capture string function. + + wxString CaptureStringData = "Example"; + CaptureString(&CaptureStringData, false); + ASSERT_EQ("Example", CaptureStringData.ToStdString()); + + CaptureStringData = "Here we go\\, an \"example\" of escaping string."; + CaptureString(&CaptureStringData, false); + ASSERT_EQ("Here we go, an \"example\" of escaping string.", CaptureStringData.ToStdString()); + + CaptureStringData = "Lets put some \\nnew \\nlines \\nin \\nhere."; + CaptureString(&CaptureStringData, false); + ASSERT_EQ("Lets put some \nnew \nlines \nin \nhere.", CaptureStringData.ToStdString()); + + CaptureStringData = "A:\\\\path\\\\example\\\\lets\\\\have\\\\some\\\\fun"; + CaptureString(&CaptureStringData, false); + ASSERT_EQ("A:\\path\\example\\lets\\have\\some\\fun", CaptureStringData.ToStdString()); + } TEST(CommonFunctions, ResetUnusedString){ -- 2.39.5