summaryrefslogtreecommitdiff
path: root/tests/misc
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-03-28 00:00:58 +0000
committerJim Meyering <jim@meyering.net>2003-03-28 00:00:58 +0000
commit1040e672f167a43aedc3deb7704b593e07e95d97 (patch)
tree61d0f2cb34a856f01a9543e8273c49d63c9d51aa /tests/misc
parentb381b40c4baaeb9bd34428d7cb78a72cb3be3607 (diff)
downloadcoreutils-1040e672f167a43aedc3deb7704b593e07e95d97.tar.xz
add tests for Paul's change of Mar 24, 2003
Diffstat (limited to 'tests/misc')
-rwxr-xr-xtests/misc/printf16
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/misc/printf b/tests/misc/printf
index 7f7074dd7..250f6656b 100755
--- a/tests/misc/printf
+++ b/tests/misc/printf
@@ -36,9 +36,21 @@ 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
+$prog '1 %*sy\n' -3 x > out || fail=1
+
+# Until coreutils-4.5.12, these would fail.
+POSIXLY_CORRECT=1 \
+$prog '2 \x' >> out || fail=1; echo >> out
+$prog '3 \x40\n' >> out || fail=1
+POSIXLY_CORRECT=1 \
+$prog '4 \x40\n' >> out || fail=1
+$prog '5 % +d\n' 234 >> out || fail=1
cat <<\EOF > exp
-x y
+1 x y
+2 \x
+3 @
+4 \x40
+5 +234
EOF
cmp out exp || fail=1