0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2024-12-15 08:39:46 +00:00
ad hoc 6e91f3a533
parser regression tests (#1216)
* fix a bunch of parse panics

* add parser regression tests
2024-03-15 09:43:48 +00:00

23 lines
638 B
Rust

use fallible_iterator::FallibleIterator;
use libsql_sqlite3_parser::lexer::sql::Parser;
const TESTCASES: &[&[u8]] = &[
include_bytes!("./regression_files/on_missing_join.sql"),
include_bytes!("./regression_files/bad_table_arg1.sql"),
include_bytes!("./regression_files/bad_table_arg2.sql"),
include_bytes!("./regression_files/bad_table_arg3.sql"),
];
#[test]
fn regressions() {
for test_case in TESTCASES {
let mut parser = Parser::new(test_case);
loop {
match parser.next() {
Ok(Some(_)) => (),
Ok(None) | Err(_) => break,
}
}
}
}