Skip to content

Commit

Permalink
Updated test according to reviewer suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
mjonss committed Jan 19, 2023
1 parent b8aa802 commit a47c6a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7145,15 +7145,15 @@ func TestTTLTableOption(t *testing.T) {

func TestMultiStmt(t *testing.T) {
p := parser.New()
stmts, _, err := p.Parse("SELECT 'foo'; SELECT 'bar','baz' ; select 'foo' , 'bar', 'baz';select 1", "", "")
stmts, _, err := p.Parse("SELECT 'foo'; SELECT 'foo;bar','baz'; select 'foo' , 'bar' , 'baz' ;select 1", "", "")
require.NoError(t, err)
require.Equal(t, len(stmts), 4)
stmt1 := stmts[0].(*ast.SelectStmt)
stmt2 := stmts[1].(*ast.SelectStmt)
stmt3 := stmts[2].(*ast.SelectStmt)
stmt4 := stmts[3].(*ast.SelectStmt)
require.Equal(t, "'foo'", stmt1.Fields.Fields[0].Text())
require.Equal(t, "'bar'", stmt2.Fields.Fields[0].Text())
require.Equal(t, "'foo;bar'", stmt2.Fields.Fields[0].Text())
require.Equal(t, "'baz'", stmt2.Fields.Fields[1].Text())
require.Equal(t, "'foo'", stmt3.Fields.Fields[0].Text())
require.Equal(t, "'bar'", stmt3.Fields.Fields[1].Text())
Expand Down

0 comments on commit a47c6a8

Please sign in to comment.