Add a test for parsing the NULL literal

(Coveralls notices we didn't have one.)
This commit is contained in:
Nickolay Ponomarev 2019-06-13 11:15:27 +03:00
parent 45c9aa1cc2
commit 5c7ff79e78

View file

@ -401,6 +401,16 @@ fn parse_projection_nested_type() {
//TODO: add assertions
}
#[test]
fn parse_null_in_select() {
let sql = "SELECT NULL";
let select = verified_only_select(sql);
assert_eq!(
&ASTNode::SQLValue(Value::Null),
expr_from_projection(only(&select.projection)),
);
}
#[test]
fn parse_escaped_single_quote_string_predicate() {
use self::ASTNode::*;