Merge pull request #909 from dolthub/andy/fix-compat-runner

use tr to lowercase output instead of {output,,}
This commit is contained in:
AndyA
2020-10-02 17:47:18 -07:00
committed by GitHub
2 changed files with 33 additions and 25 deletions

View File

@@ -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" {

View File

@@ -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