summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2004-06-15 18:04:47 +0000
committerJim Meyering <jim@meyering.net>2004-06-15 18:04:47 +0000
commita77a16acbf8ad5f36a97b2e54d716bf2a2056bdc (patch)
tree6a8fe761f3231eeba21c59962b07d9c52c5a0cec /tests
parentba01709da8c69d8b8f83aef5d9df05b25c92e0aa (diff)
downloadcoreutils-a77a16acbf8ad5f36a97b2e54d716bf2a2056bdc.tar.xz
Adjust to the new semantics for \x if POSIXLY_CORRECT.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/printf13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/misc/printf b/tests/misc/printf
index e3d5c749b..431e685da 100755
--- a/tests/misc/printf
+++ b/tests/misc/printf
@@ -38,9 +38,14 @@ rm -f out exp
# Until coreutils-4.5.10, this would elicit a segfault.
$prog '1 %*sy\n' -3 x > out || fail=1
+# Until coreutils 5.2.2, this would succeed.
+if POSIXLY_CORRECT=1 $prog '2 \x' >/dev/null 2>&1; then
+ fail=1
+else
+ echo '2 failed, as expected' >> out
+fi
+
# 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
@@ -60,9 +65,9 @@ $prog '8 %b %b %b %b\n' '\1y' '\01y' '\001y' '\0001y'|tr '\1' = >> out
cat <<\EOF > exp
1 x y
-2 \x
+2 failed, as expected
3 @
-4 \x40
+4 @
5 +234
6 !
7 =y =y =y *2y