mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-01 15:34:19 +01:00
more tests for select + fixes
This commit is contained in:
@@ -35,6 +35,22 @@ mod tests {
|
||||
);
|
||||
}
|
||||
};
|
||||
($test_name:ident, $input:literal, $($attribute:meta),*) => {
|
||||
#[test]
|
||||
$(#[$attribute])*
|
||||
fn $test_name() {
|
||||
let context = crate::to_sql_string::stmt::tests::TestContext;
|
||||
let input: &str = $input;
|
||||
let mut parser = crate::lexer::sql::Parser::new(input.as_bytes());
|
||||
let cmd = fallible_iterator::FallibleIterator::next(&mut parser)
|
||||
.unwrap()
|
||||
.unwrap();
|
||||
assert_eq!(
|
||||
input,
|
||||
crate::to_sql_string::ToSqlString::to_sql_string(cmd.stmt(), &context)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub(crate) struct TestContext;
|
||||
|
||||
Reference in New Issue
Block a user