Skip to content

Commit f9bd109

Browse files
committed
docs: update changelog
1 parent a3d8f5c commit f9bd109

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
## Unreleased
44

5+
### Added
6+
- Better code coverage HTML report
7+
58
## [0.31.0](https://github.com/TypedDevs/bashunit/compare/0.30.0...0.31.0) - 2025-12-19
69

710
### Added

src/coverage.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,14 +1047,14 @@ function bashunit::coverage::generate_file_html() {
10471047
[[ -z "$_line_and_test" ]] && continue
10481048
local _tln="${_line_and_test%%|*}"
10491049
local _tinfo="${_line_and_test#*|}"
1050-
if [[ -n "${tests_by_line[$_tln]:-}" ]]; then
1050+
if [[ -n "${tests_by_line[_tln]:-}" ]]; then
10511051
# Append only if not already present (avoid duplicates)
10521052
# Use newline boundaries to prevent false positives (e.g., test_foo matching test_foo_bar)
1053-
if [[ $'\n'"${tests_by_line[$_tln]}"$'\n' != *$'\n'"$_tinfo"$'\n'* ]]; then
1054-
tests_by_line[$_tln]="${tests_by_line[$_tln]}"$'\n'"${_tinfo}"
1053+
if [[ $'\n'"${tests_by_line[_tln]}"$'\n' != *$'\n'"$_tinfo"$'\n'* ]]; then
1054+
tests_by_line[_tln]="${tests_by_line[_tln]}"$'\n'"${_tinfo}"
10551055
fi
10561056
else
1057-
tests_by_line[$_tln]="$_tinfo"
1057+
tests_by_line[_tln]="$_tinfo"
10581058
fi
10591059
done < <(bashunit::coverage::get_all_line_tests "$file")
10601060

0 commit comments

Comments
 (0)