Add compile_long test

This commit is contained in:
imaqtkatt 2024-05-28 12:01:52 -03:00
parent f72e544da8
commit 3316964893
4 changed files with 22 additions and 776179 deletions

View File

@ -470,3 +470,20 @@ fn scott_triggers_unused() {
Ok(format!("{}{}", res.diagnostics, display_hvm_book(&res.hvm_book)))
})
}
// TODO: also run the long string file to test the readback
#[test]
fn compile_long() {
run_golden_test_dir(function_name!(), &|code, path| {
let mut book = do_parse_book(code, path, Book::builtins())?;
let opts = CompileOpts::default().set_all();
let diagnostics_cfg = DiagnosticsConfig {
recursion_cycle: Severity::Warning,
unused_definition: Severity::Allow,
..Default::default()
};
compile_book(&mut book, opts.clone(), diagnostics_cfg, None)?;
Ok("Compiled".to_string())
})
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,5 @@
---
source: tests/golden_tests.rs
input_file: tests/golden_tests/compile_long/long_str_file.bend
---
Compiled