From 41e95465a61454e0e80da21e2bf8a7c0bc249167 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 15 Dec 2005 20:15:05 +0000 Subject: [PATCH] (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. --- tests/misc/stat-printf | 2 ++ 1 file changed, 2 insertions(+) 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"}], -- 2.47.3