Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from
Apr 23, 2020

Conversation

coffeegoddd
Copy link
Contributor

No description provided.

@@ -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" {
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dolt checkout with empty string returns error

@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 ]
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we've been going with [ $status -ne 0 ]


@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
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a newline here.


run dolt checkout -b ""
[[ "$output" =~ "error: cannot checkout empty string" ]] || false
[ $status -eq 2 ]
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-ne 0

Copy link
Sponsor Contributor

@timsehn timsehn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SHIP IT. And thanks.

@coffeegoddd coffeegoddd merged commit c390671 into master Apr 23, 2020
@coffeegoddd coffeegoddd deleted the db/add-skipped-checkout-test branch April 23, 2020 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants