Skip to content

Commit

Permalink
Added test for peeking issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Razican committed Feb 7, 2022
1 parent 5663342 commit 7aa59ea
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions boa/src/syntax/parser/cursor/buffered_lexer/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,11 @@ fn skip_peeked_terminators() {
// End of stream
assert!(cur.peek(2, true, &mut interner).unwrap().is_none());
}

#[test]
fn issue_1768() {
let mut cur = BufferedLexer::from(&b"\n(\nx\n)\n"[..]);
let mut interner = Interner::default();

assert!(cur.peek(3, true, &mut interner).unwrap().is_none());
}

0 comments on commit 7aa59ea

Please sign in to comment.