Skip to content

Redo integration tests#1765

Draft
hannaeko wants to merge 103 commits intoeza-community:mainfrom
ariasuni:redo-all-the-tests
Draft

Redo integration tests#1765
hannaeko wants to merge 103 commits intoeza-community:mainfrom
ariasuni:redo-all-the-tests

Conversation

@hannaeko
Copy link
Copy Markdown

@hannaeko hannaeko commented Apr 22, 2026

(@ariasuni here) I was frustrated with the state of tests of eza. We realised the tests weren’t testing features very well or sometimes at all, and the setup was unclear and complicated.

So we removed most of what’s been here before, and built a new system around trycmd (that we already used).

  • 120+ meaningful tests, a lot of them scavenged from exa’s tests.
  • Use TOML files for tests with stdin and stderr inside instead of as separate files, to ease review and avoid multiplying the number of files
  • Test directories are created from scratch at runtime in Rust, instead of relying on a brittle, unix/linux-only shell script
  • Tests organized by platform:
    • any tests are run for every platforms in the CI
    • linux tests are executed inside of Docker instead of using Nix, both locally and in the CI
    • unix tests are executed on all Unix platforms we have in the CI
    • there are even a few windows-only tests!
  • Easy to add new tests: clear naming conventions, helpers and failsafes so that new contributors can understand and contribute new tests without requiring arcane knowledge.

hannaeko and others added 30 commits April 9, 2026 16:08
- add cache in container
- add just command to regenerate the tests outputs
Auto-reading stdin was triggered for any non-terminal fd, including
/dev/null. In sandboxed environments (bubblewrap, Docker, CI) stdin is
commonly /dev/null, causing eza to read EOF immediately, leave
input_paths empty, and produce no output with exit code 0.

Use fstat(2) on Unix to check whether stdin is a FIFO before enabling
auto-read mode. Character devices like /dev/null are excluded; explicit
--stdin flag continues to work as before. Non-Unix builds retain the
old is_terminal() fallback.

Fixes eza-community#1725
@ariasuni ariasuni force-pushed the redo-all-the-tests branch from cc9d29e to 08d3558 Compare May 4, 2026 23:22
@ariasuni ariasuni force-pushed the redo-all-the-tests branch from b3023e2 to bec3bbf Compare May 5, 2026 18:13
@ariasuni ariasuni force-pushed the redo-all-the-tests branch from 783cf90 to a2ba9a4 Compare May 5, 2026 21:24
@ariasuni
Copy link
Copy Markdown
Contributor

ariasuni commented May 5, 2026

I believe the tests are almost done. What’s left to do?

  • Tests for --mounts
  • Tests for {LS,EXA,EZA}\_COLORS (that we can scavenge from old exa’s tests).
  • Write/update documentation: CONTRIBUTING.md and TESTING.md

Questions:

  • Could we move deb.asc to another directory, like in devtools/?
  • Can i remove src/lib.rs? Doesn’t seem to be used.

Things for another PR(s):

  • Tests eza’s behavior in a pseudo-TTY
  • Tests for EZA_MIN_LUMINANCE, EZA_STDIN_SEPARATOR, EZA_STRICT

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants