* tests/du/threshold.sh: Homogenize getopt error messages.
* tests/misc/numfmt.pl: Likewise.
* tests/mv/i-3.sh: Skip on *BSD not just FreeBSD.
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
# 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
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_