Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Fixed spacing between include files and first test.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Tue, 22 Mar 2016 22:43:11 +0000 (22:43 +0000)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Tue, 22 Mar 2016 22:43:11 +0000 (22:43 +0000)
source/tests/xestiaab_common.h

index 6dbfb9f..f373df0 100644 (file)
@@ -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){
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy