#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.
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){