@@ -176,8 +176,8 @@ static void backslash()
176176
177177 readfile (" //123 \\\n 456" , &outputList);
178178 ASSERT_EQUALS (" " , toString (outputList));
179- readfile (" //123 \\ \n 456" , &outputList);
180- ASSERT_EQUALS (" file0,1,portability_backslash,Combination 'backslash space newline' is not portable.\n " , toString (outputList));
179+ // readfile("//123 \\ \n456", &outputList);
180+ // ASSERT_EQUALS("file0,1,portability_backslash,Combination 'backslash space newline' is not portable.\n", toString(outputList));
181181
182182 outputList.clear ();
183183 readfile (" #define A \\\n 123" , &outputList);
@@ -436,7 +436,24 @@ static void comment_multiline()
436436 const char code[] = " #define ABC {// \\\n "
437437 " }\n "
438438 " void f() ABC\n " ;
439- ASSERT_EQUALS (" \n\n void f ( ) { }" , preprocess (code));
439+ ASSERT_EQUALS (" \n\n void f ( ) {" , preprocess (code));
440+
441+ const char code1[] = " #define ABC {// \\\r\n "
442+ " }\n "
443+ " void f() ABC\n " ;
444+ ASSERT_EQUALS (" \n\n void f ( ) {" , preprocess (code1));
445+
446+ const char code2[] = " void f() {// \\ \n }\n " ;
447+ ASSERT_EQUALS (" void f ( ) {" , preprocess (code2));
448+
449+ const char code3[] = " void f() {// \\\\\\\t\t\n }\n " ;
450+ ASSERT_EQUALS (" void f ( ) {" , preprocess (code3));
451+
452+ const char code4[] = " void f() {// \\\\\\ a\n }\n " ;
453+ ASSERT_EQUALS (" void f ( ) {\n }" , preprocess (code4));
454+
455+ const char code5[] = " void f() {// \\\n\n\n }\n " ;
456+ ASSERT_EQUALS (" void f ( ) {\n\n\n }" , preprocess (code5));
440457}
441458
442459
0 commit comments