@@ -963,7 +963,7 @@ fn test_stdin_and_file_input() {
963963 grep_test (
964964 & [ BRE , "-" , INPUT_FILE_1 , INPUT_FILE_2 ] ,
965965 LINES_INPUT ,
966- "(standard input):line_{1}\n (standard input):p_line_{2}_s\n (standard input): line_{3} \n (standard input):line_{70}\n tests/grep/f_1:line_{1}\r \ n tests/grep/f_1:p_line_{2}_s\r \ n tests/grep/f_1: line_{3} \r \ n tests/grep/f_1:line_{70}\r \n " ,
966+ "(standard input):line_{1}\n (standard input):p_line_{2}_s\n (standard input): line_{3} \n (standard input):line_{70}\n tests/grep/f_1:line_{1}\n tests/grep/f_1:p_line_{2}_s\n tests/grep/f_1: line_{3} \n tests/grep/f_1:line_{70}\n " ,
967967 "" ,
968968 0 ,
969969 ) ;
@@ -1004,13 +1004,13 @@ fn test_stdin_and_input_files_quiet() {
10041004
10051005#[ test]
10061006fn test_stdin_and_input_files_other_options ( ) {
1007- grep_test ( & [ "-insvx" , BRE , "-" , INPUT_FILE_1 , BAD_INPUT_FILE ] , LINES_INPUT , "(standard input):2:p_line_{2}_s\n (standard input):3: line_{3} \n (standard input):5:p_LINE_{5}_s\n (standard input):6:l_{6}\n tests/grep/f_1:1:line_{1} \r \n tests/grep/f_1: 2:p_line_{2}_s\r \ n tests/grep/f_1:3: line_{3} \r \ n tests/grep/f_1:4:LINE_{4} \r \n tests/grep/f_1: 5:p_LINE_{5}_s\r \ n tests/grep/f_1:6:l_{6}\r \n tests/grep/f_1:7:line_{70} \r \n " , "" , 2 ) ;
1007+ grep_test ( & [ "-insvx" , BRE , "-" , INPUT_FILE_1 , BAD_INPUT_FILE ] , LINES_INPUT , "(standard input):2:p_line_{2}_s\n (standard input):3: line_{3} \n (standard input):5:p_LINE_{5}_s\n (standard input):6:l_{6}\n tests/grep/f_1:2:p_line_{2}_s\n tests/grep/f_1:3: line_{3} \n tests/grep/f_1:5:p_LINE_{5}_s\n tests/grep/f_1:6:l_{6}\n " , "" , 2 ) ;
10081008}
10091009
10101010#[ test]
10111011fn test_multiple_input_files ( ) {
10121012 grep_test ( & [ r#"2[[:punct:]]"# , INPUT_FILE_1 , INPUT_FILE_2 , INPUT_FILE_3 ] , LINES_INPUT ,
1013- "tests/grep/f_1:p_line_{2}_s\r \ n tests/grep/f_2:void func2() {\r \ n tests/grep/f_2: printf(\" This is function 2\\ n\" );\r \n " , "" , 0 ) ;
1013+ "tests/grep/f_1:p_line_{2}_s\n tests/grep/f_2:void func2() {\n tests/grep/f_2: printf(\" This is function 2\\ n\" );\n " , "" , 0 ) ;
10141014}
10151015
10161016#[ test]
@@ -1067,15 +1067,15 @@ fn test_multiple_input_files_quiet() {
10671067#[ test]
10681068fn test_multiple_input_files_line_number ( ) {
10691069 grep_test ( & [ "-n" , r#"2[[:punct:]]"# , INPUT_FILE_1 , INPUT_FILE_2 , INPUT_FILE_3 ] , LINES_INPUT ,
1070- "tests/grep/f_1:2:p_line_{2}_s\r \ n tests/grep/f_2:12:void func2() {\r \ n tests/grep/f_2:13: printf(\" This is function 2\\ n\" );\r \n " , "" , 0 ) ;
1070+ "tests/grep/f_1:2:p_line_{2}_s\n tests/grep/f_2:12:void func2() {\n tests/grep/f_2:13: printf(\" This is function 2\\ n\" );\n " , "" , 0 ) ;
10711071}
10721072
10731073#[ test]
10741074fn test_duplicate_input_files ( ) {
10751075 grep_test (
10761076 & [ "-n" , r#"2[[:punct:]]"# , INPUT_FILE_1 , INPUT_FILE_1 ] ,
10771077 LINES_INPUT ,
1078- "tests/grep/f_1:2:p_line_{2}_s\r \ n tests/grep/f_1:2:p_line_{2}_s\r \n " ,
1078+ "tests/grep/f_1:2:p_line_{2}_s\n tests/grep/f_1:2:p_line_{2}_s\n " ,
10791079 "" ,
10801080 0 ,
10811081 ) ;
@@ -1116,7 +1116,7 @@ fn test_duplicate_input_files_quiet() {
11161116
11171117#[ test]
11181118fn test_muptiple_pattern_files_multiple_input_files ( ) {
1119- grep_test ( & [ "-f" , BRE_FILE_1 , "-f" , BRE_FILE_2 , INPUT_FILE_1 , INPUT_FILE_2 , INPUT_FILE_3 ] , LINES_INPUT , "tests/grep/f_1:line_{1}\r \ n tests/grep/f_1:p_line_{2}_s\r \ n tests/grep/f_1: line_{3} \r \ n tests/grep/f_1:line_{70}\r \ n tests/grep/f_2:#include <stdio.h>\r \ n tests/grep/f_2:void func1() {\r \ n tests/grep/f_2:void func2() {\r \n " , "" , 0 ) ;
1119+ grep_test ( & [ "-f" , BRE_FILE_1 , "-f" , BRE_FILE_2 , INPUT_FILE_1 , INPUT_FILE_2 , INPUT_FILE_3 ] , LINES_INPUT , "tests/grep/f_1:line_{1}\n tests/grep/f_1:p_line_{2}_s\n tests/grep/f_1: line_{3} \n tests/grep/f_1:line_{70}\n tests/grep/f_2:#include <stdio.h>\n tests/grep/f_2:void func1() {\n tests/grep/f_2:void func2() {\n " , "" , 0 ) ;
11201120}
11211121
11221122#[ test]
@@ -1181,7 +1181,7 @@ fn test_muptiple_pattern_files_multiple_input_files_quiet() {
11811181
11821182#[ test]
11831183fn test_muptiple_pattern_files_multiple_input_files_line_number ( ) {
1184- grep_test ( & [ "-n" , "-f" , BRE_FILE_1 , "-f" , BRE_FILE_2 , INPUT_FILE_1 , INPUT_FILE_2 , INPUT_FILE_3 ] , LINES_INPUT , "tests/grep/f_1:1:line_{1}\r \ n tests/grep/f_1:2:p_line_{2}_s\r \ n tests/grep/f_1:3: line_{3} \r \ n tests/grep/f_1:7:line_{70}\r \ n tests/grep/f_2:1:#include <stdio.h>\r \ n tests/grep/f_2:8:void func1() {\r \ n tests/grep/f_2:12:void func2() {\r \n " , "" , 0 ) ;
1184+ grep_test ( & [ "-n" , "-f" , BRE_FILE_1 , "-f" , BRE_FILE_2 , INPUT_FILE_1 , INPUT_FILE_2 , INPUT_FILE_3 ] , LINES_INPUT , "tests/grep/f_1:1:line_{1}\n tests/grep/f_1:2:p_line_{2}_s\n tests/grep/f_1:3: line_{3} \n tests/grep/f_1:7:line_{70}\n tests/grep/f_2:1:#include <stdio.h>\n tests/grep/f_2:8:void func1() {\n tests/grep/f_2:12:void func2() {\n " , "" , 0 ) ;
11851185}
11861186
11871187#[ test]
@@ -1368,7 +1368,7 @@ fn test_long_names_files() {
13681368 INPUT_FILE_2 ,
13691369 ] ,
13701370 LINES_INPUT ,
1371- "tests/grep/f_1:line_{1}\r \ n tests/grep/f_1:p_line_{2}_s\r \ n tests/grep/f_1: line_{3} \r \ n tests/grep/f_1:line_{70}\r \n " ,
1371+ "tests/grep/f_1:line_{1}\n tests/grep/f_1:p_line_{2}_s\n tests/grep/f_1: line_{3} \n tests/grep/f_1:line_{70}\n " ,
13721372 "" ,
13731373 0 ,
13741374 ) ;
0 commit comments