diff options
author | Jim Meyering <jim@meyering.net> | 2005-12-15 20:15:05 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2005-12-15 20:15:05 +0000 |
commit | 41e95465a61454e0e80da21e2bf8a7c0bc249167 (patch) | |
tree | efde6d935cfb014e53feb2d38261d436caa7646b /tests/misc/stat-printf | |
parent | c1c8e668debc2d8b7aeaa98c4739c9730cf1e2da (diff) | |
download | coreutils-41e95465a61454e0e80da21e2bf8a7c0bc249167.tar.xz |
(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.
Diffstat (limited to 'tests/misc/stat-printf')
-rwxr-xr-x | tests/misc/stat-printf | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/misc/stat-printf b/tests/misc/stat-printf index 1b8dd85b1..13a63c4d9 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"}], |