Skip to content

Commit

Permalink
Merge pull request #909 from dolthub/andy/fix-compat-runner
Browse files Browse the repository at this point in the history
use tr to lowercase output instead of {output,,}
  • Loading branch information
andy-wm-arthur committed Oct 3, 2020
2 parents e7ca7cf + cca5ecc commit fd5dcab
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 25 deletions.
51 changes: 27 additions & 24 deletions bats/compatibility/test_files/bats/compatibility.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand All @@ -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
}


Expand All @@ -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" {
Expand Down
7 changes: 6 additions & 1 deletion bats/compatibility/test_files/dolt_versions.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
v0.13.0
v0.14.0
v0.15.0
v0.15.0
v0.16.0
v0.17.0
v0.18.0
v0.19.0
v0.20.0

0 comments on commit fd5dcab

Please sign in to comment.