eza/powertest.yaml
Christina Sørensen 7f081337bd
Some checks are pending
Unit tests / security_audit (push) Waiting to run
Unit tests / check_if_pr (push) Waiting to run
Unit tests / no-merge-commits (push) Blocked by required conditions
Unit tests / Conventional Commits (push) Blocked by required conditions
Unit tests / unit-tests (macos-latest, beta) (push) Blocked by required conditions
Unit tests / unit-tests (macos-latest, msrv) (push) Blocked by required conditions
Unit tests / unit-tests (macos-latest, nightly) (push) Blocked by required conditions
Unit tests / unit-tests (macos-latest, stable) (push) Blocked by required conditions
Unit tests / unit-tests (ubuntu-latest, beta) (push) Blocked by required conditions
Unit tests / unit-tests (ubuntu-latest, msrv) (push) Blocked by required conditions
Unit tests / unit-tests (ubuntu-latest, nightly) (push) Blocked by required conditions
Unit tests / unit-tests (ubuntu-latest, stable) (push) Blocked by required conditions
Unit tests / unit-tests (windows-latest, beta) (push) Blocked by required conditions
Unit tests / unit-tests (windows-latest, msrv) (push) Blocked by required conditions
Unit tests / unit-tests (windows-latest, nightly) (push) Blocked by required conditions
Unit tests / unit-tests (windows-latest, stable) (push) Blocked by required conditions
Unit tests / unit-tests-freebsd (beta) (push) Blocked by required conditions
Unit tests / unit-tests-freebsd (msrv) (push) Blocked by required conditions
Unit tests / unit-tests-freebsd (nightly) (push) Blocked by required conditions
Unit tests / unit-tests-freebsd (stable) (push) Blocked by required conditions
Unit tests / unit-tests-netbsd (beta) (push) Blocked by required conditions
Unit tests / unit-tests-netbsd (msrv) (push) Blocked by required conditions
Unit tests / unit-tests-netbsd (nightly) (push) Blocked by required conditions
Unit tests / unit-tests-netbsd (stable) (push) Blocked by required conditions
Unit tests / unit-tests-openbsd (push) Blocked by required conditions
Unit tests / Check Nix Flake (push) Blocked by required conditions
Unit tests / Build Nix package (push) Blocked by required conditions
feat!: define -d/--treat-dirs-as-files behavior, tests
BREAKING CHANGE: The behavior of the `-d` flag has been refined to be more
consistent with `ls`. Its long flag has been changed to `--treat-dirs-as-files`
for clarity, while `--list-dirs` is retained as a backward-compatible alias to be
removed in a future release.

Based on the preious commit by cysabi, this commit addresses
inconsistencies and ambiguities related to the `-d` flag and its
long-flag variants.

The behavior of `-d` has been aligned more closely with `ls`, where it
lists directories as regular files rather than listing contents of
directories. The new, more descriptive long flag `--treat-dirs-as-files`
clarifies this intent.

A backward-compatible alias `--list-dirs` is provided to ease the
transition for existing users, with the intention of deprecating it
later.

Since cysabi's fix included addresing `eza -TL 1` not correctly
rendering the tree depth, this also includes tests to ensure that
behavior doesn't regress in the future... again.

Specifically, `powertest` integration tests have been added for `eza
-TL<value>` for levels 0 through 5, ensuring the correct tree structure
output at specified depths. This also includes tests for the updated
`-d`/`--treat-dirs-as-files` behavior.

It is also noted that for users who primarily intend to list only directories,
the `--only-dirs` (`-D`) option might be a more suitable and explicit alternative
to `--treat-dirs-as-files`. This has been added to the man page as well
as a more verbose description of the flag.

Completions have also been fixed.
2025-06-30 19:34:33 +02:00

247 lines
3.1 KiB
YAML

# SPDX-FileCopyrightText: 2024 Christina Sørensen
# SPDX-License-Identifier: EUPL-1.2
dump_dir: tests/ptests
depth: 1
binary: eza
gen_binary: target/debug/eza
args: tests/test_dir
commands:
? - null # Meta options
- --help
:
? - -v
- --version
:
? - -1 # Display Options
- --oneline
:
? - -l
- --long
:
? - -G
- --grid
:
? - -x
- --across
:
? - -R
- --recurse
:
? - -T
- --tree
:
? - -X
- --dereference
:
? - -F
- --classify
:
? - -F
- --classify
: values:
- auto
- always
- never
? - null
- --color
: values:
- auto
- always
- never
? - null
- --colour
: values:
- auto
- always
- never
? - null
- --icons
:
? - null
- --icons
: values:
- auto
- always
- never
? - null
- --no-quotes
:
? - null
- --hyperlink
:
? - null
- --absolute
: values:
- on
- follow
- off
? - -w
- --width
: values:
- 15
- 30
- 200
? - null
- --smart-group
:
? - -a # Filtering and Sorting Options
- --all
:
? - -A
- --almost-all
:
? - -d
- --treat-dirs-as-files
:
? - null
- --list-dirs
:
? - -L # Hidden alias
- --level
: prefix: -T
values:
- 0
- 1
- 2
- 3
- 4
- 5
? - -r
- --reverse
:
? - -s
- --sort
: short: -s
long: time-style
prefix: -l
values:
#- accessed
- age
#- changed
#- created
- date
- Ext
- ext
- Extension
- extension
- Filename
- filename
- inode
- modified
- Name
- name
- newest
#- none seems non-deterministic
- oldest
- size
- time
- type
? - null
- --group-directories-first
:
? - null
- --group-directories-last
:
? - -D
- --only-dirs
:
? - -f
- --only-files
:
? - -f
- --only-files
:
? - -I # TODO: add more globs
- --ignore-glob
: prefix: -l
values:
- "*.toml"
? - null
- --git-ignore
:
? - -b # Long View Options
- --binary
:
? - -B
- --bytes
:
? - -g
- --group
:
? - -h
- --header
:
? - -H
- --links
:
? - -i
- --inode
:
? - -m
- --modified
:
? - -M
- --mounts
:
? - -n
- --numeric
:
? - -S
- --blocksize
:
? - -t
- --time
: prefix: -l
values:
- modified
#- accessed BROKEN
#- changed
#- created
? - -u
- --accessed
:
? - -U
- --created
:
? - null
- --changed
:
? - null
- --time-style
: long: time-style
values:
- default
- iso
- long-iso
- full-iso
- relative
? - null
- --total-size
:
? - null
- --no-permissions
:
? - -o
- --octal-permissions
:
? - null
- --no-filesize
:
? - null
- --no-user
:
? - null
- --git
:
? - null
- --no-git
:
? - null
- --git-repos
:
? - -@
- --extended
:
? - -Z
- --context
: