Fix invalid indices when content is not long enough
Signed-off-by: Marcel Müller <neikos@neikos.email>
This commit is contained in:
parent
fa1582f3ad
commit
462355b6f2
4 changed files with 25 additions and 7 deletions
14
tests/checks.rs
Normal file
14
tests/checks.rs
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#[test]
|
||||
fn check_files() {
|
||||
let files = std::fs::read_dir("tests/checks/").unwrap();
|
||||
|
||||
for file in files {
|
||||
let input = std::fs::read_to_string(file.unwrap().path()).unwrap();
|
||||
|
||||
let parsed = nomo::parser::parse(input.into()).unwrap();
|
||||
|
||||
let ast = nomo::ast::parse(parsed.tokens()).unwrap();
|
||||
|
||||
let _emit = nomo::emit::emit_machine(ast);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue