diff --git a/integration-tests/bats/bats.bats b/integration-tests/bats/bats.bats index ef477e2feb..ad5a5d500d 100644 --- a/integration-tests/bats/bats.bats +++ b/integration-tests/bats/bats.bats @@ -1,14 +1,13 @@ #!/usr/bin/env bats - -@test "bats: all assertions work on Mac" { - run pwd - echo "PWD: $output" - +# Assert that all bash test constructs will correctly fail on Mac OS's older bash version +# by ending them with '|| false'. +# https://github.com/sstephenson/bats/issues/49 +@test "bats: all bash test constructs end with '|| false' { run grep -E ' *\]\][[:space:]]*$' -n *.bats # grep returns 0 if matches are found, 1 if matches are NOT found, and 2 if no input files were found echo -e "Incorrect bash test constructs: \n$output" - [ "$status" -eq 1 ] - [[ "$output" =~ "No tables to export." ]] - [[ "$output" =~ "another" ]] + [ $status -eq 1 ] + [[ $output =~ "No tables to export." ]] + [[ $output =~ "another" ]] } \ No newline at end of file