From: Jim Meyering Date: Thu, 15 Dec 2005 20:15:05 +0000 (+0000) Subject: (print_it): Properly handle a backslash at the X-Git-Tag: v6.0~1103 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=41e95465a61454e0e80da21e2bf8a7c0bc249167;p=thirdparty%2Fcoreutils.git (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. --- diff --git a/tests/misc/stat-printf b/tests/misc/stat-printf index 1b8dd85b16..13a63c4d96 100755 --- a/tests/misc/stat-printf +++ b/tests/misc/stat-printf @@ -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"}],