Skip to content

Commit

Permalink
Add test for Q_LET
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden committed Nov 13, 2023
1 parent a971b6c commit 4ab1f13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ func TestParseQueryies(t *testing.T) {
_, err := ParseQueries(query{Query: sql, Line: 1})
assertEqual(t, err, ErrInvalidCommand, fmt.Sprintf("Expected: %v, got %v", ErrInvalidCommand, err))

sql = "--let $foo=`SELECT 1`"
if q, err := ParseQueries(query{Query: sql, Line: 1}); err == nil {
assertEqual(t, q[0].tp, Q_LET, fmt.Sprintf("Expected: %d, got: %d", Q_LET, q[0].tp))
}
}

0 comments on commit 4ab1f13

Please sign in to comment.