From 59f45099bc06e351410b1dcffbf9ab08c82ba655 Mon Sep 17 00:00:00 2001 From: Andy Arthur Date: Tue, 24 Nov 2020 17:45:12 -0800 Subject: [PATCH] updated NULLs in compat bats --- .../test_files/bats/compatibility.bats | 22 +++++++++---------- bats/compatibility/test_files/setup_repo.sh | 2 ++ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/bats/compatibility/test_files/bats/compatibility.bats b/bats/compatibility/test_files/bats/compatibility.bats index 6639809478..7605d53593 100755 --- a/bats/compatibility/test_files/bats/compatibility.bats +++ b/bats/compatibility/test_files/bats/compatibility.bats @@ -112,12 +112,11 @@ teardown() { run dolt sql -q 'select * from abc;' [ "$status" -eq 0 ] - echo $output - [[ "${lines[1]}" =~ "| pk | a | b | x | y |" ]] || false - [[ "${lines[2]}" =~ "+----+------+-----+---+------+" ]] || false - [[ "${lines[3]}" =~ "| 0 | asdf | 1.1 | 0 | NULL |" ]] || false - [[ "${lines[4]}" =~ "| 2 | asdf | 1.1 | 0 | NULL |" ]] || false - [[ "${lines[5]}" =~ "| 3 | data | 1.1 | 0 | NULL |" ]] || false + [[ "${lines[1]}" =~ "| pk | a | b | x | y |" ]] || false + [[ "${lines[2]}" =~ "+----+------+-----+---+-----+" ]] || false + [[ "${lines[3]}" =~ "| 0 | asdf | 1.1 | 0 | 121 |" ]] || false + [[ "${lines[4]}" =~ "| 2 | asdf | 1.1 | 0 | 121 |" ]] || false + [[ "${lines[5]}" =~ "| 3 | data | 1.1 | 0 | 121 |" ]] || false } @test "dolt schema show on branch other" { @@ -146,12 +145,11 @@ teardown() { dolt checkout other run dolt sql -q 'select * from abc;' [ "$status" -eq 0 ] - echo $output - [[ "${lines[1]}" =~ "| pk | a | b | w | z |" ]] || false - [[ "${lines[2]}" =~ "+----+------+-----+---+------+" ]] || false - [[ "${lines[3]}" =~ "| 0 | asdf | 1.1 | 0 | NULL |" ]] || false - [[ "${lines[4]}" =~ "| 1 | asdf | 1.1 | 0 | NULL |" ]] || false - [[ "${lines[5]}" =~ "| 4 | data | 1.1 | 0 | NULL |" ]] || false + [[ "${lines[1]}" =~ "| pk | a | b | w | z |" ]] || false + [[ "${lines[2]}" =~ "+----+------+-----+---+-----+" ]] || false + [[ "${lines[3]}" =~ "| 0 | asdf | 1.1 | 0 | 122 |" ]] || false + [[ "${lines[4]}" =~ "| 1 | asdf | 1.1 | 0 | 122 |" ]] || false + [[ "${lines[5]}" =~ "| 4 | data | 1.1 | 0 | 122 |" ]] || false dolt checkout master } diff --git a/bats/compatibility/test_files/setup_repo.sh b/bats/compatibility/test_files/setup_repo.sh index 1b07dd2ec1..e1158c82d1 100755 --- a/bats/compatibility/test_files/setup_repo.sh +++ b/bats/compatibility/test_files/setup_repo.sh @@ -34,6 +34,7 @@ DELETE FROM abc WHERE pk=1; INSERT INTO abc VALUES (3, 'data', 1.1, 0, 0); ALTER TABLE abc DROP COLUMN w; ALTER TABLE abc ADD COLUMN y BIGINT; +UPDATE abc SET y = 121; SQL dolt add . dolt commit -m "made changes to master" @@ -44,6 +45,7 @@ DELETE FROM abc WHERE pk=2; INSERT INTO abc VALUES (4, 'data', 1.1, 0, 0); ALTER TABLE abc DROP COLUMN x; ALTER TABLE abc ADD COLUMN z BIGINT; +UPDATE abc SET z = 122; SQL dolt add . dolt commit -m "made changes to other"