diff --git a/cpp/ycm/tests/IdentifierUtils_test.cpp b/cpp/ycm/tests/IdentifierUtils_test.cpp index fa986ff3..04b5eafa 100644 --- a/cpp/ycm/tests/IdentifierUtils_test.cpp +++ b/cpp/ycm/tests/IdentifierUtils_test.cpp @@ -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"