From dc21148ff54b73d6d8d666af5a499010396cc9e2 Mon Sep 17 00:00:00 2001 From: Andy Arthur Date: Fri, 2 Oct 2020 13:52:04 -0700 Subject: [PATCH] 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" {