Skip to content

Commit cd0bcb2

Browse files
committed
Fix vacuous max-version assertion in pandoc oracle gate test
unit_test_format_gate_failure_contains_required_info asserted the message contained "3.10" for both the raw detected version and the calibrated max, but the test input's detected version line already equaled the max boundary, so the max check passed even if the Calibrated range fragment were broken. Assert on the full range substring instead.
1 parent c83f049 commit cd0bcb2

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

  • crates/pampa/tests/integration

crates/pampa/tests/integration/test.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -260,16 +260,15 @@ mod pandoc_oracle_gate_tests {
260260
message.contains("pandoc 3.10"),
261261
"message should contain the raw detected version line, got: {message}"
262262
);
263-
let min_str = format!(
264-
"{}.{}",
265-
PANDOC_ORACLE_MIN_VERSION.0, PANDOC_ORACLE_MIN_VERSION.1
266-
);
267-
let max_str = format!(
268-
"{}.{}",
269-
PANDOC_ORACLE_MAX_VERSION.0, PANDOC_ORACLE_MAX_VERSION.1
263+
let range_str = format!(
264+
"Calibrated range: {}.{}\u{2013}{}.{}",
265+
PANDOC_ORACLE_MIN_VERSION.0,
266+
PANDOC_ORACLE_MIN_VERSION.1,
267+
PANDOC_ORACLE_MAX_VERSION.0,
268+
PANDOC_ORACLE_MAX_VERSION.1
270269
);
271270
assert!(
272-
message.contains(&min_str) && message.contains(&max_str),
271+
message.contains(&range_str),
273272
"message should contain the calibrated range, got: {message}"
274273
);
275274
assert!(

0 commit comments

Comments
 (0)