mirror of
https://github.com/HigherOrderCO/Bend.git
synced 2024-09-11 11:56:54 +03:00
Add compile_long test
This commit is contained in:
parent
f72e544da8
commit
3316964893
@ -470,3 +470,20 @@ fn scott_triggers_unused() {
|
|||||||
Ok(format!("{}{}", res.diagnostics, display_hvm_book(&res.hvm_book)))
|
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
5
tests/snapshots/compile_long__long_str_file.bend.snap
Normal file
5
tests/snapshots/compile_long__long_str_file.bend.snap
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
source: tests/golden_tests.rs
|
||||||
|
input_file: tests/golden_tests/compile_long/long_str_file.bend
|
||||||
|
---
|
||||||
|
Compiled
|
Loading…
Reference in New Issue
Block a user