mirror of
https://github.com/dolthub/dolt.git
synced 2026-05-13 03:10:03 -05:00
Trying out an automated check to prevent future bash test bugs on Mac
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bats
|
||||
|
||||
|
||||
@test "bats: all assertions work on Mac" {
|
||||
run pwd
|
||||
echo "PWD: $output"
|
||||
|
||||
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" ]]
|
||||
}
|
||||
Reference in New Issue
Block a user