From db6587fd2928798dab9d815ea198e10c20090c42 Mon Sep 17 00:00:00 2001 From: Pavel Safronov Date: Fri, 31 Mar 2023 16:11:34 -0700 Subject: [PATCH] Adding BATS fixes for GMS JSON change. --- integration-tests/bats/json-new-fmt.bats | 65 ++++++++++--------- .../bats/sql-vertical-format.expect | 2 +- 2 files changed, 35 insertions(+), 32 deletions(-) diff --git a/integration-tests/bats/json-new-fmt.bats b/integration-tests/bats/json-new-fmt.bats index 550ccd4d31..2209537fd2 100644 --- a/integration-tests/bats/json-new-fmt.bats +++ b/integration-tests/bats/json-new-fmt.bats @@ -33,23 +33,23 @@ SQL SQL run dolt sql -q "SELECT * FROM js;" -r csv [ "$status" -eq 0 ] - [ "${lines[1]}" = '1,"{""a"":1}"' ] - [ "${lines[2]}" = '2,"{""b"":2}"' ] + [ "${lines[1]}" = '1,"{""a"": 1}"' ] + [ "${lines[2]}" = '2,"{""b"": 2}"' ] dolt sql <&"}'); SQL run dolt sql -q "SELECT * FROM js;" -r csv + echo "output: $output" [ "$status" -eq 0 ] - [ "${lines[1]}" = '1,"{""a"":""<>&""}"' ] + [ "${lines[1]}" = '1,"{""a"": ""<>&""}"' ] } @@ -246,8 +248,9 @@ SQL INSERT INTO js VALUES (1, '[{"a":"<>&"}]'); SQL run dolt sql -q "SELECT * FROM js;" -r csv + echo "output: $output" [ "$status" -eq 0 ] - [ "${lines[1]}" = '1,"[{""a"":""<>&""}]"' ] + [ "${lines[1]}" = '1,"[{""a"": ""<>&""}]"' ] } @test "json-new-fmt: json casting behavior" { diff --git a/integration-tests/bats/sql-vertical-format.expect b/integration-tests/bats/sql-vertical-format.expect index ac0f094d2c..36db35af0a 100644 --- a/integration-tests/bats/sql-vertical-format.expect +++ b/integration-tests/bats/sql-vertical-format.expect @@ -42,7 +42,7 @@ expect { } expect { - "*JSON_OBJECT('id', 87, 'name', 'carrot'): {\"id\":87,\"name\":\"carrot\"}*" { exit 0 ; } + "*JSON_OBJECT('id', 87, 'name', 'carrot'): {\"id\": 87, \"name\": \"carrot\"}*" { exit 0 ; } timeout { puts "$TEST_FAILURE" } failed { puts "$TEST_FAILURE" } }