diff options
Diffstat (limited to 'test/cli.t')
| -rw-r--r-- | test/cli.t | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -191,3 +191,23 @@ A year outside the supported domain is rejected (exit 2): $ colitur readings 1000 colitur: year 1000 out of range 1583..9999 [2] + +An explicit COLITUR_DATA_DIR that does not hold the data is an error (exit 2), +never a silent fall-back to some other copy. A packager or operator who names +a directory has stated an intent; quietly calendaring off a different one +because theirs was wrong is the silent substitution this project refuses +everywhere else. The first version of this resolution DID fall through, and a +deliberately bogus value produced a full, plausible, entirely un-flagged year: + + $ COLITUR_DATA_DIR=/nonexistent/xyz colitur readings 2026 + colitur: COLITUR_DATA_DIR is set to /nonexistent/xyz, which contains no sanctoral.sexp + colitur: refusing to fall back to another data directory -- unset it, or point it at one + [2] + +An empty or half-populated installed directory is a different case and DOES +fall through to the build tree: nobody stated an intent there, and a failed or +partially removed install must not shadow a working tree and then fail later +with a confusing per-file error. (Exercised directly in the task, by creating +_build/default/share/colitur/ef and confirming the year still resolves; not +reproduced here because the cram sandbox's own exe path makes the layout +awkward to stage without asserting on dune internals.) |
