Skip to content

Commit

Permalink
Add reproducer for #660
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-schulze-vireso committed Oct 19, 2022
1 parent 27807ae commit 743c189
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions test/bats.bats
Expand Up @@ -1480,3 +1480,12 @@ enforce_own_process_group() {
[ "${#lines[@]}" -eq 6 ]

}

@test "Exit code is zero after successful retry (see #660)" {
export LOG="$BATS_TEST_TMPDIR/call.log"
bats_require_minimum_version 1.5.0
reentrant_run -0 bats "$FIXTURE_ROOT/retry_success.bats"
[ "${lines[0]}" == '1..1' ]
[ "${lines[1]}" == 'ok 1 Fail once' ]
[ ${#lines[@]} == 2 ]
}
5 changes: 5 additions & 0 deletions test/fixtures/bats/retry_success.bats
@@ -0,0 +1,5 @@
BATS_TEST_RETRIES=2 # means three tries per test

@test "Fail once" {
((BATS_TEST_TRY_NUMBER > 1)) || false
}

0 comments on commit 743c189

Please sign in to comment.