Redirect native TeX diagnostics to real output streams
This commit is contained in:
1 parent
6ebcb75794
commit
6675ab639a
11 files changed
+540
-21
No files matched your search
@@ -236,3 +236,29 @@ fn error_recovery_preserves_real_side_effect_ownership_and_recompiles() {
|
||||
);
|
||||
fs::remove_dir_all(root).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn redirected_show_uses_the_open_stream_without_setting_the_cli_error_status() {
|
||||
let root = directory();
|
||||
let oracle = directory();
|
||||
let entry = "show-stream.tex";
|
||||
let input = r"\catcode123=1\catcode125=2
|
||||
\immediate\openout5=report.dat
|
||||
{\showstream=5\def\shown{ABC}\show\shown\showthe\count0\showlists}
|
||||
\immediate\closeout5
|
||||
\end";
|
||||
fs::write(root.join(entry), input).unwrap();
|
||||
fs::write(oracle.join(entry), input).unwrap();
|
||||
let expected = reference(&oracle, entry);
|
||||
let actual = native(&root, entry);
|
||||
assert!(expected.status.success());
|
||||
assert!(actual.status.success(), "{actual:?}");
|
||||
assert_eq!(
|
||||
fs::read(root.join("report.dat")).unwrap(),
|
||||
fs::read(oracle.join("report.dat")).unwrap()
|
||||
);
|
||||
let log = fs::read_to_string(root.join("job.log")).unwrap();
|
||||
assert!(!log.contains("> \\shown"));
|
||||
fs::remove_dir_all(root).unwrap();
|
||||
fs::remove_dir_all(oracle).unwrap();
|
||||
}
|
||||
Reference in new issue
Block a user