From: Jim Meyering Date: Mon, 10 Mar 2003 12:24:59 +0000 (+0000) Subject: Add a test for the above-fixed bug. X-Git-Tag: v4.5.10~37 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f089969ec96e168d8a5eb0475c08ea9bab585a8d;p=thirdparty%2Fcoreutils.git Add a test for the above-fixed bug. --- diff --git a/tests/misc/printf b/tests/misc/printf index cbca7ea4e3..7f7074dd70 100755 --- a/tests/misc/printf +++ b/tests/misc/printf @@ -34,4 +34,14 @@ EOF cmp out exp || fail=1 test $fail = 1 && diff out exp 2> /dev/null +rm -f out exp +# Until coreutils-4.5.10, this would elicit a segfault. +$prog '%*sy\n' -3 x > out || fail=1 +cat <<\EOF > exp +x y +EOF + +cmp out exp || fail=1 +test $fail = 1 && diff out exp 2> /dev/null + (exit $fail); exit $fail