/bats/arg-parsing.bats: Add skipped test for checkout panic

This commit is contained in:
Dustin Brown
2020-04-23 14:04:17 -07:00
parent eb9b13e082
commit 132db31337

View File

@@ -45,3 +45,13 @@ teardown() {
skip "Can't chain modal arguments"
dolt table import -fc test `batshelper 1pk5col-ints.csv`
}
@test "dolt does not panic and returns error when empty string used with checkout" {
run dolt checkout ""
skip "Panics when attempting to checkout empty string" [[ "$output" =~ "error: cannot checkout empty string" ]] || false
[ $status -eq 2 ]
run dolt checkout -b ""
[[ "$output" =~ "error: cannot checkout empty string" ]] || false
[ $status -eq 2 ]
}