]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: avoid false failures on OpenBSD 5.7
authorPádraig Brady <P@draigBrady.com>
Thu, 2 Jul 2015 12:55:52 +0000 (13:55 +0100)
committerPádraig Brady <P@draigBrady.com>
Thu, 2 Jul 2015 18:15:08 +0000 (19:15 +0100)
* tests/du/threshold.sh: Homogenize getopt error messages.
* tests/misc/numfmt.pl: Likewise.
* tests/mv/i-3.sh: Skip on *BSD not just FreeBSD.

tests/du/threshold.sh
tests/misc/numfmt.pl
tests/mv/i-3.sh

index 4ce44982aa9b679434474e6e92ebd4f8ca9d5adc..a4e488ae9b8d372397ad3eaa334a2878c0e6e3e0 100755 (executable)
@@ -102,9 +102,11 @@ du --threshold= a > out 2>&1 && fail=1
 compare exp out || fail=1
 
 # Exercise a bad argument: no argument.
-du --threshold > out 2>&1 && fail=1
+du --threshold > out.tmp 2>&1 && fail=1
+sed 's/argument.*/argument/; s/option.*requires/option requires/' \
+  < out.tmp > out || framework_failure_
 cat <<EOF > exp
-du: option '--threshold' requires an argument
+du: option requires an argument
 Try 'du --help' for more information.
 EOF
 compare exp out || fail=1
index fcda1ce039afca931c4b768fdb43d00aeba92866..0e4dc79c4eac3c24641dd8e7a697fd16ac9981be 100755 (executable)
@@ -582,8 +582,9 @@ my @Tests =
 
      # Invalid parameters
      ['help-1', '--foobar',
-             {ERR=>"$prog: unrecognized option '--foobar'\n" .
+             {ERR=>"$prog: unrecognized option\n" .
                    "Try '$prog --help' for more information.\n"},
+             {ERR_SUBST=>"s/option.*/option/; s/unknown/unrecognized/"},
              {EXIT=>1}],
 
      ## Format string - check error detection
index 77d4a44f99f9a17b063bd22dee7b3aa4beb2eca9..5dba1fe4c588555c324cd8e81dd0c69a00f1cc12 100755 (executable)
@@ -23,7 +23,7 @@ require_controlling_input_terminal_
 skip_if_root_
 trap '' TTIN # Ignore SIGTTIN
 
-test "$(uname -s)" = FreeBSD && skip_ "known spurious failure on FreeBSD"
+uname -s | grep 'BSD$' && skip_ 'known spurious failure on *BSD'
 
 touch f g h i || framework_failure_
 chmod 0 g i || framework_failure_