mirror of
https://github.com/storytold/gridcraft.git
synced 2026-10-24 02:36:48 -06:00
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:
co-authored by
Claude Opus 5.5
parent
be45ccab31
commit
afb6eca31f
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user