diff options
author | Pádraig Brady <P@draigBrady.com> | 2015-11-04 01:14:33 +0000 |
---|---|---|
committer | Pádraig Brady <P@draigBrady.com> | 2015-11-04 23:30:15 +0000 |
commit | c3763e5219979a714d380304b4847c9b1671241a (patch) | |
tree | c03037a34bc7d825889134b3ad53cededd1bab16 /tests/misc | |
parent | 109b9220cead6e979d22d16327c4d9f8350431cc (diff) | |
download | coreutils-c3763e5219979a714d380304b4847c9b1671241a.tar.xz |
paste: avoid confusing backslash quoting in diagnostic
* src/paste.c (main): Setting the quoting style to "escape"
went against the intent of the comment about presenting
doubled backslashes to the user. Instead use "c-maybe"
which is the only mode which avoids doubled backslashes,
and provides protection against arbitrary control characters.
* tests/misc/paste.pl: Adjust accordingly.
Diffstat (limited to 'tests/misc')
-rwxr-xr-x | tests/misc/paste.pl | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/misc/paste.pl b/tests/misc/paste.pl index 8d957f469..962f84a42 100755 --- a/tests/misc/paste.pl +++ b/tests/misc/paste.pl @@ -44,9 +44,8 @@ my @Tests = # Specifying a delimiter with a trailing backslash would overrun a # malloc'd buffer. ['delim-bs1', q!-d'\'!, {IN=>{'a'x50=>''}}, {EXIT => 1}, - # We print a single backslash into the expected output, so need four - # (two, each escaped) here. - {ERR => $msg . q!\\\\! . "\n"} ], + # We print a single backslash into the expected output + {ERR => $msg . q!\\! . "\n"} ], # Prior to coreutils-5.1.2, this sort of abuse would make paste # scribble on command-line arguments. With paste from coreutils-5.1.0, @@ -55,7 +54,7 @@ my @Tests = # $ paste -d\\ '123\b\b\b.....@' 2>&1 |cat -A # paste: 23^H^H^H.....@...@: No such file or directory$ ['delim-bs2', q!-d'\'!, {IN=>{'123\b\b\b.....@'=>''}}, {EXIT => 1}, - {ERR => $msg . q!\\\\! . "\n"} ], + {ERR => $msg . q!\\! . "\n"} ], ); my $save_temps = $ENV{DEBUG}; |