0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2024-11-14 19:27:10 +00:00
libsql/vendored/sqlite3-parser/tests/regression.rs
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,
}
}
}
}