eza/tests
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
..
cmd fix(tree-view): Ensure nested tree parts align under item name 2024-10-18 16:39:09 +02:00
gen ci: update to PRESENT DAY, PRESENT TIME 2024-12-18 18:50:22 +01:00
itest test: Add directory symlink to tests/itest/ 2024-03-04 07:12:23 +01:00
ptests feat!: define -d/--treat-dirs-as-files behavior, tests 2025-06-30 19:34:33 +02:00
cli_tests.rs test: Implements tests using the generated directory 2023-11-13 17:41:03 +01:00