diff options
| author | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-17 21:00:17 +0200 |
|---|---|---|
| committer | Lukasz Kasprzak <lukas@labunix.xyz> | 2026-08-17 21:00:17 +0200 |
| commit | d8ce8c3806111e1d1ba54d2ef99a8ae550c7567b (patch) | |
| tree | 90ce70d45eb104d642c3a1375f8c97b8853eb21f /test/cli.t | |
| parent | 301b9abd8e47e487dc5159d49d8e2432bc62488c (diff) | |
| download | colitur-d8ce8c3806111e1d1ba54d2ef99a8ae550c7567b.tar.gz colitur-d8ce8c3806111e1d1ba54d2ef99a8ae550c7567b.zip | |
test(cli): pin the version's shape, not its literalv0.2.0
The release target bumps bin/main.ml and dune-project, but cli.t pinned
the literal too, so cutting 0.2.0 failed `make check` on a cram diff that
was purely the bump working correctly. Every release would have had to
edit a test for no gain.
The shape is asserted here instead. The value is already checked where it
can actually drift: the release target requires the freshly built binary
to report the version it just wrote.
Diffstat (limited to 'test/cli.t')
| -rw-r--r-- | test/cli.t | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -247,11 +247,16 @@ not embedded in the help text above: this pin would then have to be edited every release, for no gain. The Makefile's release target asserts the built binary reports the version it just wrote, so the two cannot drift. - $ colitur --version - 0.1.0 +The SHAPE is pinned here, not the value. Pinning the literal would mean +editing this test on every release for no gain, and the value is already +asserted where it can actually drift: the Makefile's release target requires +the freshly built binary to report the version it just wrote. - $ colitur -V - 0.1.0 + $ colitur --version | grep -cE '^[0-9]+\.[0-9]+\.[0-9]+$' + 1 + + $ test "$(colitur --version)" = "$(colitur -V)" && echo same + same Agreement with the package metadata (dune-project's own (version ...), which generates colitur.opam) is NOT asserted here: the cram sandbox has no source |
