tests: env: ensure env -a requires a command

Reported at https://github.com/uutils/coreutils/issues/15991

* tests/env/env.sh: Add test cases.

Link: https://github.com/coreutils/coreutils/pull/414
This commit is contained in:
Sylvestre Ledru authored and Pádraig Brady committed 2026-11-07 12:35:10 +00:00
1 parent 8df8852fdc
commit 3c77964c82
1 file changed
+6
+6
View File
@@ -189,6 +189,12 @@ EOF
compare err_exp err || fail=1
done
# --argv0 requires a command.
returns_ 125 env -a foo > out 2> err || fail=1
compare /dev/null out || fail=1
returns_ 125 env --argv0=foo > out 2> err || fail=1
compare /dev/null out || fail=1
# QUOTING_STYLE does not affect redirected output.
# --quoting-style does affect redirected output.
cat <<\EOF >exp-noargs-literal || framework_failure_