summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2011-09-01 12:14:11 +0200
committerJim Meyering <meyering@redhat.com>2011-09-01 16:36:23 +0200
commitac54e1e4d25b80dcf389000e56c573844d98e335 (patch)
tree17b08ada05ece5e6e6403ad18213611caf44e270 /tests
parenta8c7983629c8f9d34cf3e710a531f6f4d95f4fe0 (diff)
downloadcoreutils-ac54e1e4d25b80dcf389000e56c573844d98e335.tar.xz
tests: misc/printf: accommodate alternate behavior
* tests/misc/printf: Avoid false positive failure on MacOS X 10.5 due to a slightly differing diagnostic. Reported by Bruno Haible.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/printf5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/misc/printf b/tests/misc/printf
index 752da6e02..b9092e17f 100755
--- a/tests/misc/printf
+++ b/tests/misc/printf
@@ -110,6 +110,11 @@ cat <<EOF > exp
0
EOF
+# POSIX says strtoimax *may* set errno to EINVAL in the latter
+# two cases. So far, that happens at least on MacOS X 10.5.
+# Map that output to the more common expected output.
+sed 's/: Invalid.*/: expected a numeric value/' err > k && mv k err
+
cat <<EOF > exp_err
printf: warning: ": character(s) following character constant have been ignored
printf: ": expected a numeric value