]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
doc: tweak tests to avoid false failure with --help
authorPádraig Brady <P@draigBrady.com>
Sat, 17 Jan 2026 18:17:49 +0000 (18:17 +0000)
committerPádraig Brady <P@draigBrady.com>
Wed, 21 Jan 2026 13:51:40 +0000 (13:51 +0000)
* tests/df/df-output.sh: Use a more relaxed match.
* tests/du/inodes.sh: Likewise.

tests/df/df-output.sh
tests/du/inodes.sh

index 6c5fe3c7b186c3458c8ec85d56c4a920ff69da2b..de062ee7839157e6b1648730d14781398da38742 100755 (executable)
@@ -125,7 +125,7 @@ compare exp out2 || fail=1
 
 # Ensure that --output is mentioned in the usage.
 df --help > out || fail=1
-grep --output' out >/dev/null || { fail=1; cat out; }
+grep -- '--output' out >/dev/null || { fail=1; cat out; }
 
 # Ensure that the FILE field contains the argument.
 cat <<\EOF > exp || framework_failure_
index 2af22972529d860a576e552aa370b381a01355f4..1d2dcd13eee78472e2af429d71a6d234e4f04498 100755 (executable)
@@ -136,5 +136,5 @@ grep ' ineffective ' err >/dev/null || { fail=1; cat out err; }
 
 # Ensure that --inodes is mentioned in the usage.
 du --help > out || fail=1
-grep ' --inodes ' out >/dev/null || { fail=1; cat out; }
+grep -- '--inodes' out >/dev/null || { fail=1; cat out; }
 Exit $fail