diff --git a/integration-tests/bats/diff.bats b/integration-tests/bats/diff.bats index d3975a8d54..753a6d0397 100644 --- a/integration-tests/bats/diff.bats +++ b/integration-tests/bats/diff.bats @@ -79,7 +79,7 @@ teardown() { dolt diff run dolt diff [ "$status" -eq 0 ] - [[ ! "$output" =~ "CREATE TABLE" ]] + [[ ! "$output" =~ "CREATE TABLE" ]] || false [[ "$output" =~ "| | pk | c1 | c2 | c3 | c4 | c5 |" ]] || false [[ "$output" =~ "| + | 10 | NULL | NULL | NULL | NULL | NULL |" ]] || false } @@ -87,18 +87,38 @@ teardown() { @test "diff: schema diff only" { dolt commit -am "First commit" - dolt sql -q "alter table test drop column c1" + dolt sql -q < | pk | c2 | c3 | c4 | c5 | |" ]] || false -} + [[ "$output" =~ "$EXPECTED" ]] || false + + # We want to make sure there is no trailing table output, so count the lines of output + # 3 lines of metadata plus 11 of schema diff + [ "${#lines[@]}" -eq 14 ] + } @test "diff: with table args" { dolt sql -q 'create table other (pk int not null primary key)'