Expand deferred TeX input without recursive dispatch frames
This commit is contained in:
1 parent
ebbc9e2c17
commit
6d54af5350
3 files changed
+67
-20
No files matched your search
@@ -150,13 +150,22 @@ fn invalid_quantities_overflows_units_and_readonly_positions_fail() {
|
||||
for source in [
|
||||
format!("\\number{}0", "\\count".repeat(130)),
|
||||
format!("\\number{}0", "\\dimen".repeat(130)),
|
||||
format!("{}\\relax", "\\expandafter\\relax".repeat(130)),
|
||||
] {
|
||||
let error = Executor::default()
|
||||
.run(file(&source), &mut FontFiles)
|
||||
.unwrap_err();
|
||||
assert!(error.message.contains("nesting limit"), "{}", error.message);
|
||||
}
|
||||
|
||||
let chain = "\\expandafter A".repeat(64);
|
||||
let source = format!("\\message{{CHAIN:{chain}\\number 17}}");
|
||||
assert_eq!(messages(&run(&source)), [format!("CHAIN:{}17", "A".repeat(64))]);
|
||||
|
||||
let limits = Limits { input_depth: 32, ..Limits::default() };
|
||||
let error = Executor::new(State::default(), limits)
|
||||
.run(file(&source), &mut FontFiles)
|
||||
.unwrap_err();
|
||||
assert!(error.message.contains("input stack limit"), "{}", error.message);
|
||||
}
|
||||
|
||||
struct Files(BTreeMap<String, String>);
|
||||
|
||||
Reference in new issue
Block a user