Test: drive the linear-time parse check through the uncapped parser

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas 2026-10-13 01:06:20 -04:00
parent be45ccab31
commit afb6eca31f
1 changed files with 2 additions and 1 deletions

View File

@ -825,7 +825,8 @@ fn format_codes_are_capped_at_255_characters() {
fn finishes_in_time(code: String) -> String {
let (tx, rx) = std::sync::mpsc::channel();
std::thread::spawn(move || {
let _ = tx.send(f(&code, 1234.5));
// Uncapped: `parse` turns a code past 255 characters into General before the parser sees it.
let _ = tx.send(format_value(&Value::Number(1234.5), &NumberFormat::parse_uncapped(&code), S).text);
});
rx.recv_timeout(std::time::Duration::from_secs(20)).expect("format code did not parse and render in time")
}