diff --git a/contrib/mysql/test.sql b/contrib/mysql/test.sql index 6c37a8f284a..89be9a8c8c7 100644 --- a/contrib/mysql/test.sql +++ b/contrib/mysql/test.sql @@ -62,8 +62,6 @@ insert into authors (name) values \echo `echo hello` -select :"COLNAME" from authors where :COLNAME like '%' || :'NAME' || '%' - \print \raw \g diff --git a/contrib/postgres/test.sql b/contrib/postgres/test.sql index 9fd1d39e67f..8fc92010b64 100644 --- a/contrib/postgres/test.sql +++ b/contrib/postgres/test.sql @@ -66,8 +66,6 @@ insert into authors (name) values \echo `echo hello` -select :"COLNAME" from authors where :COLNAME like '%' || :'NAME' || '%' - \print \raw \g diff --git a/contrib/sqlite3/test.sql b/contrib/sqlite3/test.sql index 8a6fe0926a9..2fba66373b2 100644 --- a/contrib/sqlite3/test.sql +++ b/contrib/sqlite3/test.sql @@ -60,8 +60,6 @@ insert into authors (name) values \echo `echo hello` -select :"COLNAME" from authors where :COLNAME like '%' || :'NAME' || '%' - \print \raw \g diff --git a/contrib/sqlserver/test.sql b/contrib/sqlserver/test.sql index 509030cd894..4856b9558d1 100644 --- a/contrib/sqlserver/test.sql +++ b/contrib/sqlserver/test.sql @@ -52,8 +52,6 @@ insert into authors (name) values \echo `echo hello` -select :"COLNAME" from authors where :COLNAME like '%' || :'NAME' || '%' - \print \raw \g diff --git a/testcli.go b/testcli.go index 6900afa24d5..9078611d341 100644 --- a/testcli.go +++ b/testcli.go @@ -12,6 +12,7 @@ import ( "log" "os" "regexp" + "strings" "time" gexpect "github.com/google/goexpect" @@ -119,6 +120,7 @@ func (test Test) do(ctx context.Context, binpath string, timeout time.Duration) gexpect.SetEnv(test.env), gexpect.Tee(&noopWriteCloser{os.Stdout}), ) + exp.Options(gexpect.Verbose(true)) if err != nil { return err } @@ -127,8 +129,12 @@ func (test Test) do(ctx context.Context, binpath string, timeout time.Duration) return err } for _, line := range bytes.Split(buf, []byte{'\n'}) { - if err := exp.Send(string(line) + "\n"); err != nil { - return err + lineStr := strings.TrimSpace(string(line)) + if lineStr != "" { // technically only trailing empty lines are a problem but they are harder to check for + time.Sleep(100 * time.Millisecond) + if err := exp.Send(string(line) + "\n"); err != nil { + return err + } } } select {