File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ assert_file_matches_regex cfbs.json '"added_by".*"cfbs init"'
1111
1212cfbs --non-interactive add package-method-winget
1313assert_file_matches_regex cfbs.json ' "added_by".*"package-method-winget"'
14- assert_count 1 cfbs.json ' "cfbs add"'
14+ assert_num_string_occurrences 1 cfbs.json ' "cfbs add"'
1515
1616cfbs --non-interactive add powershell-execution-policy
1717assert_file_not_contains cfbs.json ' "added_by": "package-method-winget"'
18- assert_count 2 cfbs.json ' "cfbs add"'
18+ assert_num_string_occurrences 2 cfbs.json ' "cfbs add"'
1919
2020test_finish
Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ assert_no_diff() {
134134 || _test_fail " Expected files to differ but they are identical: $1 vs $2 "
135135}
136136
137- assert_count () {
137+ assert_num_string_occurrences () {
138138 local expected=" $1 " file=" $2 " pattern=" $3 "
139139 local actual
140140 actual=$( grep -cF " $pattern " " $file " || true)
You can’t perform that action at this time.
0 commit comments