]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: coreutils: ensure empty arg is diagnosed
authoroech3 <79379754+oech3@users.noreply.github.com>
Mon, 30 Mar 2026 09:07:42 +0000 (18:07 +0900)
committerPádraig Brady <P@draigBrady.com>
Mon, 30 Mar 2026 12:43:58 +0000 (13:43 +0100)
* tests/misc/coreutils.sh: Add a test case.
https://github.com/coreutils/coreutils/pull/232

tests/misc/coreutils.sh

index 955b3681a9076afbe5d46e2d10c1210456b0f0d6..36829360e1502260f0cb77b29d1094d3a9f43dd7 100755 (executable)
@@ -27,6 +27,9 @@ echo 'y' > exp &&
 coreutils --coreutils-prog=yes | head -n10 | uniq > out || framework_failure_
 compare exp out || fail=1
 
+# Ensure empty arg is rejected
+returns_ 1 coreutils $unset_command || fail=1
+
 # Ensure if incorrect program passed, we diagnose
 echo "coreutils: unknown program 'blah'" > exp || framework_failure_