commit | 2b674c4d0a30843b77c418e285f9b4f9994074af | [log] [tgz] |
---|---|---|
author | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | Wed Jun 24 17:49:35 2015 +0900 |
committer | Shinichiro Hamaji <shinichiro.hamaji@gmail.com> | Thu Jun 25 17:51:01 2015 +0900 |
tree | ed9c8243ddc5717a8e7c18860a88b9ba49af8e5b | |
parent | ff4584d584ef604a0870c30fee7562f40050fafa [diff] [blame] |
[C++] Fix NoLineBreak
diff --git a/strutil_test.cc b/strutil_test.cc index bcff29f..2810412 100644 --- a/strutil_test.cc +++ b/strutil_test.cc
@@ -67,9 +67,15 @@ assert(SubstPattern("x.x.c", "x.c", "XX") == "x.x.c"); } +void TestNoLineBreak() { + assert(NoLineBreak("a\nb") == "a\\nb"); + assert(NoLineBreak("a\nb\nc") == "a\\nb\\nc"); +} + int main() { TestWordScanner(); TestHasPrefix(); TestHasSuffix(); TestSubstPattern(); + TestNoLineBreak(); }