Skip to content

Commit

Permalink
Fix name of failing test not printed
Browse files Browse the repository at this point in the history
when using timing and tap13 formatter. (Fixes bats-core#555)
  • Loading branch information
martin-schulze-vireso committed Mar 16, 2022
1 parent 5259220 commit ffca8c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libexec/bats-core/bats-format-tap13
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ while IFS= read -r line; do
'not ok '*)
close_previous_yaml_block
number_of_printed_log_lines_for_this_test_so_far=0
timing_expr="not ok [0-9]+ (.)+ in ([0-9])+ms$"
timing_expr="(not ok [0-9]+ .+) in ([0-9])+ms$"
if [[ -n "${BATS_ENABLE_TIMING-}" ]]; then
if [[ "$line" =~ $timing_expr ]]; then
printf "%s\n" "${BATS_REMATCH[1]}"
printf "%s\n" "${BASH_REMATCH[1]}"
add_yaml_entry "duration_ms" "${BASH_REMATCH[2]}"
else
echo "Could not match failure line to timing regex: $line" >&2
Expand Down

0 comments on commit ffca8c8

Please sign in to comment.