Skip to content

Commit

Permalink
Allow for comments and remove todo
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-schulze-vireso committed Jul 5, 2022
1 parent f29a88d commit 97c8df4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions libexec/bats-core/bats-exec-suite
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,6 @@ if [[ -n "$filter_status" ]]; then

if IFS='' read -d $'\n' -r BATS_PREVIOUS_RUNLOG_FILE < <(ls -1r "$BATS_RUN_LOGS_DIRECTORY"); then
BATS_PREVIOUS_RUNLOG_FILE="$BATS_RUN_LOGS_DIRECTORY/$BATS_PREVIOUS_RUNLOG_FILE"
# TODO: only when this case is used do we get the failures where all tests are run after a missing test has been added
# this can happen when doing multiple runs in the same second (e.g. bats internal tests)
if [[ $BATS_PREVIOUS_RUNLOG_FILE == "$BATS_RUNLOG_FILE" ]]; then
count=$(find "$BATS_RUN_LOGS_DIRECTORY" -name "$BATS_RUNLOG_DATE*" | wc -l)
BATS_RUNLOG_FILE="$BATS_RUN_LOGS_DIRECTORY/${BATS_RUNLOG_DATE}-$count.log"
Expand All @@ -195,6 +193,8 @@ if [[ -n "$filter_status" ]]; then
;;
"status-filtered "*) # ignore other status-filtered lines
;;
"#"*) # allow for comments
;;
*)
printf "Error: %s:%d: Invalid format: %s\n" "$BATS_PREVIOUS_RUNLOG_FILE" "$i" "$line" >&2
exit 1
Expand Down

0 comments on commit 97c8df4

Please sign in to comment.