Permalink
Browse files

[test] add unit test for StringUtils::Paramify

  • Loading branch information...
Montellese committed Feb 26, 2013
1 parent 06d0b88 commit 3715563d9762a065b8b8643153dbc640ba1d5763
Showing with 9 additions and 0 deletions.
  1. +9 −0 xbmc/utils/test/TestStringUtils.cpp
@@ -462,3 +462,12 @@ TEST(TestStringUtils, FindBestMatch)
EXPECT_EQ(refint, varint);
EXPECT_EQ(refdouble, vardouble);
}
+
+TEST(TestStringUtils, Paramify)
+{
+ const char *input = "some, very \\ odd \"string\"";
+ const char *ref = "\"some, very \\\\ odd \\\"string\\\"\"";
+
+ std::string result = StringUtils::Paramify(input);
+ EXPECT_STREQ(ref, result.c_str());
+}

0 comments on commit 3715563

Please sign in to comment.