From dc21148ff54b73d6d8d666af5a499010396cc9e2 Mon Sep 17 00:00:00 2001 From: Andy Arthur Date: Fri, 2 Oct 2020 13:52:04 -0700 Subject: [PATCH 1/2] use tr to lowercase output instead of {output,,} --- .../test_files/bats/compatibility.bats | 51 ++++++++++--------- 1 file changed, 27 insertions(+), 24 deletions(-) diff --git a/bats/compatibility/test_files/bats/compatibility.bats b/bats/compatibility/test_files/bats/compatibility.bats index 0cbec2f741..0965e0c7d7 100755 --- a/bats/compatibility/test_files/bats/compatibility.bats +++ b/bats/compatibility/test_files/bats/compatibility.bats @@ -61,14 +61,15 @@ teardown() { dolt checkout init run dolt schema show abc [ "$status" -eq 0 ] - [[ "${output,,}" =~ "abc @ working" ]] || false - [[ "${output,,}" =~ "create table \`abc\` (" ]] || false - [[ "${output,,}" =~ "\`pk\` bigint not null" ]] || false - [[ "${output,,}" =~ "\`a\` longtext" ]] || false - [[ "${output,,}" =~ "\`b\` double" ]] || false - [[ "${output,,}" =~ "\`w\` bigint" ]] || false - [[ "${output,,}" =~ "\`x\` bigint" ]] || false - [[ "${output,,}" =~ "primary key (\`pk\`)" ]] || false + output=`echo $output | tr '[:upper:]' '[:lower:]'` # lowercase the output + [[ "${output}" =~ "abc @ working" ]] || false + [[ "${output}" =~ "create table \`abc\` (" ]] || false + [[ "${output}" =~ "\`pk\` bigint not null" ]] || false + [[ "${output}" =~ "\`a\` longtext" ]] || false + [[ "${output}" =~ "\`b\` double" ]] || false + [[ "${output}" =~ "\`w\` bigint" ]] || false + [[ "${output}" =~ "\`x\` bigint" ]] || false + [[ "${output}" =~ "primary key (\`pk\`)" ]] || false } @test "dolt sql 'select * from abc' on branch init" { @@ -93,14 +94,15 @@ teardown() { run dolt schema show abc [ "$status" -eq 0 ] - [[ "${output,,}" =~ "abc @ working" ]] || false - [[ "${output,,}" =~ "create table \`abc\` (" ]] || false - [[ "${output,,}" =~ "\`pk\` bigint not null" ]] || false - [[ "${output,,}" =~ "\`a\` longtext" ]] || false - [[ "${output,,}" =~ "\`b\` double" ]] || false - [[ "${output,,}" =~ "\`x\` bigint" ]] || false - [[ "${output,,}" =~ "\`y\` bigint" ]] || false - [[ "${output,,}" =~ "primary key (\`pk\`)" ]] || false + output=`echo $output | tr '[:upper:]' '[:lower:]'` # lowercase the output + [[ "${output}" =~ "abc @ working" ]] || false + [[ "${output}" =~ "create table \`abc\` (" ]] || false + [[ "${output}" =~ "\`pk\` bigint not null" ]] || false + [[ "${output}" =~ "\`a\` longtext" ]] || false + [[ "${output}" =~ "\`b\` double" ]] || false + [[ "${output}" =~ "\`x\` bigint" ]] || false + [[ "${output}" =~ "\`y\` bigint" ]] || false + [[ "${output}" =~ "primary key (\`pk\`)" ]] || false } @@ -124,14 +126,15 @@ teardown() { dolt checkout other run dolt schema show abc [ "$status" -eq 0 ] - [[ "${output,,}" =~ "abc @ working" ]] || false - [[ "${output,,}" =~ "create table \`abc\` (" ]] || false - [[ "${output,,}" =~ "\`pk\` bigint not null" ]] || false - [[ "${output,,}" =~ "\`a\` longtext" ]] || false - [[ "${output,,}" =~ "\`b\` double" ]] || false - [[ "${output,,}" =~ "\`w\` bigint" ]] || false - [[ "${output,,}" =~ "\`z\` bigint" ]] || false - [[ "${output,,}" =~ "primary key (\`pk\`)" ]] || false + output=`echo $output | tr '[:upper:]' '[:lower:]'` # lowercase the output + [[ "${output}" =~ "abc @ working" ]] || false + [[ "${output}" =~ "create table \`abc\` (" ]] || false + [[ "${output}" =~ "\`pk\` bigint not null" ]] || false + [[ "${output}" =~ "\`a\` longtext" ]] || false + [[ "${output}" =~ "\`b\` double" ]] || false + [[ "${output}" =~ "\`w\` bigint" ]] || false + [[ "${output}" =~ "\`z\` bigint" ]] || false + [[ "${output}" =~ "primary key (\`pk\`)" ]] || false } @test "dolt sql 'select * from abc' on branch other" { From cca5ecc0fba301e997931cc1c9ba073e9d817367 Mon Sep 17 00:00:00 2001 From: Andy Arthur Date: Fri, 2 Oct 2020 14:17:59 -0700 Subject: [PATCH 2/2] added more versions for compatibility --- bats/compatibility/test_files/dolt_versions.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bats/compatibility/test_files/dolt_versions.txt b/bats/compatibility/test_files/dolt_versions.txt index 0afef28722..cb3e458fb8 100644 --- a/bats/compatibility/test_files/dolt_versions.txt +++ b/bats/compatibility/test_files/dolt_versions.txt @@ -1,3 +1,8 @@ v0.13.0 v0.14.0 -v0.15.0 \ No newline at end of file +v0.15.0 +v0.16.0 +v0.17.0 +v0.18.0 +v0.19.0 +v0.20.0 \ No newline at end of file