test: the shipped-document walk must not skip a gzipped one

Self-review of improvise-odbc's own guard. The walk filtered on
`Path::extension() == "improv"`, and `extension()` of `demo.improv.gz` is
`gz` — so a gzipped shipped document would have been skipped silently, which
is exactly the "exercised by nothing" hole the test exists to close, put back
one line inside the fix for it.

Matched on the full name instead. Proved both arms: a valid `.improv.gz`
dropped into `examples/` passes, and a truncated one fails. (The truncation
also exercises the `with_context` added two commits ago, from the other side.)

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Edward Langley
2026-09-19 22:48:12 -07:00
parent 84e6c5aa49
commit 239f1f0b80
+7 -1
View File
@@ -25,7 +25,13 @@ fn shipped_documents() -> Vec<PathBuf> {
.iter()
.flat_map(|dir| std::fs::read_dir(root.join(dir)).expect("a shipped-document directory"))
.map(|entry| entry.expect("a readable directory entry").path())
.filter(|p| p.extension().is_some_and(|e| e == "improv"))
// `.improv.gz` is the same document gzipped, and `extension()` calls
// it `gz` — so matching on the extension alone would skip it and put
// back the very hole this test exists to close.
.filter(|p| {
p.to_str()
.is_some_and(|s| s.ends_with(".improv") || s.ends_with(".improv.gz"))
})
.collect();
found.sort();
found