properly test the patch in IdentifierUtils::RemoveIdentifierFreeText

This commit is contained in:
Pi-Hsun Shih 2013-03-21 13:36:07 +08:00
parent 2d11be9162
commit 83f8d65775

View File

@ -89,10 +89,20 @@ TEST( IdentifierUtilsTest, RemoveIdentifierFreeTextWorks ) {
"foo \n"
"bar \n"
"qux" );
EXPECT_STREQ( RemoveIdentifierFreeText(
"foo \n"
"bar \"foo\\\\\\\"ooo\"\n"
"qux \"baz\\\\\\\\\""
"bar \"fo\\\\\"baz\n"
"qux \"qwe\""
).c_str(),
"foo \n"
"bar baz\n"
"qux " );
EXPECT_STREQ( RemoveIdentifierFreeText(
"foo '\\\\'\n"
"bar '\\\\'\n"
"qux '\\\\'"
).c_str(),
"foo \n"
"bar \n"