Repository navigation
Conversation
This changes the default value of the `--color` flag to `always` rather than `auto` when the `INSIDE_DUNE` variable is set. As discussed before (see mirage#207 and ocaml/dune#145), Alcotest output is not coloured by default if run via `dune runtest`, since Dune's buffering mechanism keeps the test process from having direct access to the terminal. We now have the `ALCOTEST_COLOR` variable for experienced users to override this behaviour, but I suspect the better solution is to default to _always_ showing colours, so that new users are not surprised by this interaction. People who really don't want colours can still disable it with the environment variable or the command-line option. Travis CI appears to filter out any ANSII colour codes in its logs (see https://travis-ci.org/github/mirage/irmin/jobs/686951739#L3684).
This drops support for OCaml 4.03 and 4.04. See discussion in mirage#242 (comment).
The 'latest' symlink is less useful in projects with many different test binaries (such as this one), since each suite runner overwrites the symlink from the previous one.
This test causes plenty of trouble in CI, and seems to be not very portable. The important test is that it's possible to _override_ the default, which has been kept.
... by computing the Levenshtein edit script from the expected list to the actual list and then using this to highlight the relevant indices. Also implemented for arrays.
craigfe
force-pushed
the
subcomponent-diffing
branch
from
May 25, 2020 10:07
4945c00 to
8d1b44d
Compare
Member
Author
|
Closing as I'm not currently working on this. Hopefully it can return after #347 has been resolved. |
tmattio
added a commit
to tmattio/opam-repository
that referenced
this pull request
Feb 13, 2026
CHANGES: Windtrap is an all-in-one OCaml testing framework that unifies unit tests, property-based tests, snapshot tests, and expect tests under a single API. Instead of juggling multiple testing libraries, Windtrap gives you one cohesive package with a PPX for inline expect tests (`windtrap.ppx`). - Unit tests with combinators, tags, skip, brackets, and timeouts. - Property-based testing with configurable seeds and shrinking. - Snapshot testing with automatic file management and diffing. - Inline expect tests via `windtrap.ppx` with automatic correction. - CLI test runner with filtering, verbosity, and color support. - Test coverage reporting with `bisect_ppx` integration. ### Acknowledgments Windtrap builds on ideas and code from several OCaml projects: - **[Alcotest](https://github.com/mirage/alcotest)** by Thomas Gazagnaire — test structure and runner design - **Craig Ferguson's Alcotest PRs** ([invariant-hq/windtrap#294](mirage/alcotest#294), [invariant-hq/windtrap#247](mirage/alcotest#247)) — API design, subcomponent diffing, and Levenshtein distance (ISC) - **[QCheck2](https://github.com/c-cube/qcheck)** by Simon Cruanes et al. — generator design and integrated shrinking (BSD 2-Clause) - **[ppx_expect](https://github.com/janestreet/ppx_expect)** and **[ppx_inline_test](https://github.com/janestreet/ppx_inline_test)** by Jane Street — expect test paradigm and dune integration - **[Bisect_ppx](https://github.com/aantron/bisect_ppx)** by Anton Bachin et al. — coverage instrumentation and runtime (MIT)
tmattio
added a commit
to tmattio/opam-repository
that referenced
this pull request
Feb 15, 2026
CHANGES: Windtrap is an all-in-one OCaml testing framework that unifies unit tests, property-based tests, snapshot tests, and expect tests under a single API. Instead of juggling multiple testing libraries, Windtrap gives you one cohesive package with a PPX for inline expect tests (`windtrap.ppx`). - Unit tests with combinators, tags, skip, brackets, and timeouts. - Property-based testing with configurable seeds and shrinking. - Snapshot testing with automatic file management and diffing. - Inline expect tests via `windtrap.ppx` with automatic correction. - CLI test runner with filtering, verbosity, and color support. - Test coverage reporting with `bisect_ppx` integration. ### Acknowledgments Windtrap builds on ideas and code from several OCaml projects: - **[Alcotest](https://github.com/mirage/alcotest)** by Thomas Gazagnaire — test structure and runner design - **Craig Ferguson's Alcotest PRs** ([invariant-hq/windtrap#294](mirage/alcotest#294), [invariant-hq/windtrap#247](mirage/alcotest#247)) — API design, subcomponent diffing, and Levenshtein distance (ISC) - **[QCheck2](https://github.com/c-cube/qcheck)** by Simon Cruanes et al. — generator design and integrated shrinking (BSD 2-Clause) - **[ppx_expect](https://github.com/janestreet/ppx_expect)** and **[ppx_inline_test](https://github.com/janestreet/ppx_inline_test)** by Jane Street — expect test paradigm and dune integration - **[Bisect_ppx](https://github.com/aantron/bisect_ppx)** by Anton Bachin et al. — coverage instrumentation and runtime (MIT)
tmattio
added a commit
to tmattio/opam-repository
that referenced
this pull request
Feb 15, 2026
CHANGES: Windtrap is an all-in-one OCaml testing framework that unifies unit tests, property-based tests, snapshot tests, and expect tests under a single API. Instead of juggling multiple testing libraries, Windtrap gives you one cohesive package with a PPX for inline expect tests (`windtrap.ppx`). - Unit tests with combinators, tags, skip, brackets, and timeouts. - Property-based testing with configurable seeds and shrinking. - Snapshot testing with automatic file management and diffing. - Inline expect tests via `windtrap.ppx` with automatic correction. - CLI test runner with filtering, verbosity, and color support. - Test coverage reporting with `bisect_ppx` integration. ### Acknowledgments Windtrap builds on ideas and code from several OCaml projects: - **[Alcotest](https://github.com/mirage/alcotest)** by Thomas Gazagnaire — test structure and runner design - **Craig Ferguson's Alcotest PRs** ([invariant-hq/windtrap#294](mirage/alcotest#294), [invariant-hq/windtrap#247](mirage/alcotest#247)) — API design, subcomponent diffing, and Levenshtein distance (ISC) - **[QCheck2](https://github.com/c-cube/qcheck)** by Simon Cruanes et al. — generator design and integrated shrinking (BSD 2-Clause) - **[ppx_expect](https://github.com/janestreet/ppx_expect)** and **[ppx_inline_test](https://github.com/janestreet/ppx_inline_test)** by Jane Street — expect test paradigm and dune integration - **[Bisect_ppx](https://github.com/aantron/bisect_ppx)** by Anton Bachin et al. — coverage instrumentation and runtime (MIT)
tmattio
added a commit
to tmattio/opam-repository
that referenced
this pull request
Feb 16, 2026
CHANGES: Windtrap is an all-in-one OCaml testing framework that unifies unit tests, property-based tests, snapshot tests, and expect tests under a single API. Instead of juggling multiple testing libraries, Windtrap gives you one cohesive package with a PPX for inline expect tests (`ppx_windtrap`). - Unit tests with combinators, tags, skip, brackets, and timeouts. - Property-based testing with configurable seeds and shrinking. - Snapshot testing with automatic file management and diffing. - Inline expect tests via `ppx_windtrap` with automatic correction. - CLI test runner with filtering, verbosity, and color support. - Test coverage reporting with `bisect_ppx` integration. ### Acknowledgments Windtrap builds on ideas and code from several OCaml projects: - **[Alcotest](https://github.com/mirage/alcotest)** by Thomas Gazagnaire — test structure and runner design - **Craig Ferguson's Alcotest PRs** ([invariant-hq/windtrap#294](mirage/alcotest#294), [invariant-hq/windtrap#247](mirage/alcotest#247)) — API design, subcomponent diffing, and Levenshtein distance (ISC) - **[QCheck2](https://github.com/c-cube/qcheck)** by Simon Cruanes et al. — generator design and integrated shrinking (BSD 2-Clause) - **[ppx_expect](https://github.com/janestreet/ppx_expect)** and **[ppx_inline_test](https://github.com/janestreet/ppx_inline_test)** by Jane Street — expect test paradigm and dune integration - **[Bisect_ppx](https://github.com/aantron/bisect_ppx)** by Anton Bachin et al. — coverage instrumentation and runtime (MIT)
tmattio
added a commit
to tmattio/opam-repository
that referenced
this pull request
Feb 16, 2026
CHANGES: Windtrap is an all-in-one OCaml testing framework that unifies unit tests, property-based tests, snapshot tests, and expect tests under a single API. Instead of juggling multiple testing libraries, Windtrap gives you one cohesive package with a PPX for inline expect tests (`ppx_windtrap`). - Unit tests with combinators, tags, skip, brackets, and timeouts. - Property-based testing with configurable seeds and shrinking. - Snapshot testing with automatic file management and diffing. - Inline expect tests via `ppx_windtrap` with automatic correction. - CLI test runner with filtering, verbosity, and color support. - Test coverage reporting with `bisect_ppx` integration. ### Acknowledgments Windtrap builds on ideas and code from several OCaml projects: - **[Alcotest](https://github.com/mirage/alcotest)** by Thomas Gazagnaire — test structure and runner design - **Craig Ferguson's Alcotest PRs** ([invariant-hq/windtrap#294](mirage/alcotest#294), [invariant-hq/windtrap#247](mirage/alcotest#247)) — API design, subcomponent diffing, and Levenshtein distance (ISC) - **[QCheck2](https://github.com/c-cube/qcheck)** by Simon Cruanes et al. — generator design and integrated shrinking (BSD 2-Clause) - **[ppx_expect](https://github.com/janestreet/ppx_expect)** and **[ppx_inline_test](https://github.com/janestreet/ppx_inline_test)** by Jane Street — expect test paradigm and dune integration - **[Bisect_ppx](https://github.com/aantron/bisect_ppx)** by Anton Bachin et al. — coverage instrumentation and runtime (MIT)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Depends on #246.
WIP efforts towards a diffing output that highlights differing subcomponents:
For lists, arrays and strings, this works by computing the Levenshtein edit script between the
expectedandactualvalues and highlighting the affected indices in the output.TODOs:
Traversabletypes);