← Commit list

96a183323

Denys Vlasenko
Denys Vlasenko
2010-04-19
FAILED Duration: 27s

Subject

sed: fix c cmd

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

editors/sed.c+1 -1
@@ -1031,7 +1031,7 @@ static void process_files(void)
case 'c':
/* Only triggers on last line of a matching range. */
if (!sed_cmd->in_match)
- sed_puts(sed_cmd->string, NO_EOL_CHAR);
+ sed_puts(sed_cmd->string, '\n');
goto discard_line;
/* Read file, append contents to output */
testsuite/sed.tests+5 -0
@@ -248,4 +248,9 @@ testing "sed beginning (^) matches only once" \
">/usr</>lib<\n" "" \
"/usr/lib\n"
+testing "sed c" \
+ "sed 'crepl'" \
+ "repl\nrepl\n" "" \
+ "first\nsecond\n"
+
exit $FAILCOUNT