From 83f8d65775b49f10b3c9276e3554d5534125d784 Mon Sep 17 00:00:00 2001 From: Pi-Hsun Shih Date: Thu, 21 Mar 2013 13:36:07 +0800 Subject: [PATCH] properly test the patch in IdentifierUtils::RemoveIdentifierFreeText --- cpp/ycm/tests/IdentifierUtils_test.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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"