Skip to content

Commit

Permalink
test: Add a second stack overflow test
Browse files Browse the repository at this point in the history
  • Loading branch information
Markus Westerlind committed Sep 9, 2022
1 parent 6a60a15 commit a93b511
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libflux/flux-core/src/parser/tests/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -940,3 +940,10 @@ fn dont_stack_overflow() {
let parsed = p.parse_file("".to_string());
assert!(&ast::check::check(ast::walk::Node::File(&parsed)).is_err());
}

#[test]
fn dont_stack_overflow_2() {
let mut p = Parser::new(include_str!("stack_overflow_2.flux"));
let parsed = p.parse_file("".to_string());
assert!(&ast::check::check(ast::walk::Node::File(&parsed)).is_err());
}
1 change: 1 addition & 0 deletions libflux/flux-core/src/parser/tests/stack_overflow_2.flux
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
x = false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false or false

0 comments on commit a93b511

Please sign in to comment.