1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-14 03:12:10 +02:00

(print_it): Properly handle a backslash at the

end of a --printf format string.  Reported by Paul Eggert.

(end-bs): Add a test for the above.
This commit is contained in:
Jim Meyering
2005-12-15 20:15:05 +00:00
parent c1c8e668de
commit 41e95465a6

View File

@@ -43,6 +43,8 @@ my @Tests =
['end-pct', "--printf=% .", {OUT=>"%"}],
['pct-pct', "--printf=%% .", {OUT=>"%"}],
['end-bs', "--printf='\\' .", {OUT=>'\\'},
{ERR=>"$prog: warning: backslash at end of format\n"}],
['err-1', "--printf=%9% .", {EXIT => 1},
{ERR=>"$prog: %9%: invalid directive\n"}],