mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-11-19 03:33:43 +03:00
tests: augment new ls --zero test cases
* tests/ls/zero-option.sh: Check for the disabled, disallowed, and allowed option combinations.
This commit is contained in:
1 parent
eca33373ce
commit
dcd6e4172c
1 file changed
+9
-1
@@ -21,7 +21,15 @@ print_ver_ ls
|
||||
|
||||
mkdir dir && touch dir/a dir/b dir/cc || framework_failure_
|
||||
|
||||
LC_ALL=C ls --zero dir >out || fail=1
|
||||
allowed_options='-l' # explict -l with --zero is allowed
|
||||
LC_ALL=C ls $allowed_options --zero dir >out || fail=1
|
||||
grep '^total' out || fail=1 # Ensure -l honored
|
||||
|
||||
disallowed_options='-l --dired' # dired only enabled with -l
|
||||
returns_ 2 ls $disallowed_options --zero dir || fail=1
|
||||
|
||||
disabled_options='--color=always -x -m -C -Q -q'
|
||||
LC_ALL=C ls $disabled_options --zero dir >out || fail=1
|
||||
tr '\n' '\0' <<EOF >exp
|
||||
a
|
||||
b
|
||||
|
||||
Reference in new issue
Block a user