]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: misc/printf: accommodate alternate behavior
authorJim Meyering <meyering@redhat.com>
Thu, 1 Sep 2011 10:14:11 +0000 (12:14 +0200)
committerJim Meyering <meyering@redhat.com>
Thu, 1 Sep 2011 14:36:23 +0000 (16:36 +0200)
* tests/misc/printf: Avoid false positive failure on MacOS X 10.5
due to a slightly differing diagnostic.  Reported by Bruno Haible.

tests/misc/printf

index 752da6e0235cfe63661ca840739e9390557b7646..b9092e17f147111b06327c59bafa04e3fe7f8cb7 100755 (executable)
@@ -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