diff --git a/docs/ROUTE_D_STATUS.md b/docs/ROUTE_D_STATUS.md index 413b548..560a2da 100755 --- a/docs/ROUTE_D_STATUS.md +++ b/docs/ROUTE_D_STATUS.md @@ -31,9 +31,9 @@ The oracle suite compiles fixtures with `pdflatex`, extracts word boxes with (saying so) when the TeX tools are absent. The server suite includes `corpus_documents_preview_without_warnings`, which previews `examples/hello.tex`, `examples/boxes.tex`, `examples/compat.tex` and -`fixtures/arxiv-template/template.tex` and asserts 200, at least one page and an -empty `warnings` array for each. A manual sweep of the same four documents -reports 0 warnings, 1/1/1/2 pages and under 1.5 s per preview. +`fixtures/arxiv-template/template.tex` and asserts 200, the expected page count +(1/1/1/2) and an empty `warnings` array for each. A manual sweep of the same four +documents reports 0 warnings and under 1.5 s per preview. ## Service defaults diff --git a/tests/server.rs b/tests/server.rs index 9c0b7e7..76ef0d8 100644 --- a/tests/server.rs +++ b/tests/server.rs @@ -2366,9 +2366,17 @@ fn corpus_documents_preview_without_warnings() { let value: Value = serde_json::from_slice(&response.body).expect("preview JSON"); let warnings = value["warnings"].as_array().cloned().unwrap_or_default(); assert!(warnings.is_empty(), "{relative}: {warnings:?}"); - assert!( - value["pageCount"].as_u64().unwrap_or(0) >= 1, - "{relative}: no pages" + let expected_pages = match relative { + "examples/hello.tex" => 1, + "examples/boxes.tex" => 1, + "examples/compat.tex" => 1, + "fixtures/arxiv-template/template.tex" => 2, + other => panic!("unexpected corpus document {other}"), + }; + assert_eq!( + value["pageCount"].as_u64(), + Some(expected_pages), + "{relative}: wrong page count" ); } }