Skip to content

Commit

Permalink
tests.bash: continue debugging by continuing tests despite failure, b…
Browse files Browse the repository at this point in the history
…ut still return failure
  • Loading branch information
balupton committed Jan 7, 2025
1 parent 268afa4 commit 39b921d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions sources/tests.bash
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function fs_tests__prep {

function fs_tests__root_status {
local status="$1"
if is-root; then
if is-root --quiet; then
__print_lines "$status"
else
__print_lines '13'
Expand Down Expand Up @@ -133,14 +133,18 @@ function fs_tests__tuples {
root="$(fs-temp --directory="$command")"

# tests
local index status path total="${#tuples[@]}"
local index status path total="${#tuples[@]}" result=0
for ((index = 0; index < total; index += 2)); do
status="${tuples[index]}"
path="${tuples[index + 1]}"
if [[ ${#args[@]} -eq 0 ]]; then
eval-tester --name="$index / $total" --status="$status" -- "$command" -- "$path"
eval-tester --name="$index / $total" --status="$status" -- "$command" -- "$path" || result=$?
else
eval-tester --name="$index / $total" --status="$status" -- "$command" "${args[@]}" -- "$path"
eval-tester --name="$index / $total" --status="$status" -- "$command" "${args[@]}" -- "$path" || result=$?
fi
done
if [[ $result -ne 0 ]]; then
return 1
fi
return 0
}

0 comments on commit 39b921d

Please sign in to comment.