summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-03-10 12:24:59 +0000
committerJim Meyering <jim@meyering.net>2003-03-10 12:24:59 +0000
commitf089969ec96e168d8a5eb0475c08ea9bab585a8d (patch)
treecfc6055fff5e2246bf7cad04ea2b699541ec953e /tests/misc
parentb44a6e85658f77ec1ec3a8947b4eb497892e9db2 (diff)
downloadcoreutils-f089969ec96e168d8a5eb0475c08ea9bab585a8d.tar.xz
Add a test for the above-fixed bug.
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/printf10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/misc/printf b/tests/misc/printf
index cbca7ea4e..7f7074dd7 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