From: Steve Brokenshire Date: Tue, 22 Mar 2016 22:43:11 +0000 (+0000) Subject: Fixed spacing between include files and first test. X-Git-Tag: release-0.11~12 X-Git-Url: http://Server1/repobrowser/?p=xestiaab%2F.git;a=commitdiff_plain;h=65e83a58c7d3e09a83f77eb897df3b73f1bae4f8 Fixed spacing between include files and first test. --- 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){