test: count assert_output_contains matches as fixed strings
Replace the bash pattern-substitution loop with grep -F -o piped to wc -l so the helper counts literal substring occurrences instead of treating the expected value as a glob pattern. The old implementation interpreted `[`, `]`, `*`, `?`, and `\` as pattern syntax, which made `assert_output_contains "['task.py', 'test']"` report 17 matches against an output that contained the string exactly once - the inner characters were being matched as a character class. assert_output_not_contains delegates to assert_output_contains and is fixed transitively.
This commit is contained in:
@@ -468,7 +468,7 @@ teardown() {
|
||||
assert_success
|
||||
assert_output_contains "dns provider cf_api_email"
|
||||
assert_output_contains "dns provider cf_api_key"
|
||||
assert_output_contains "*******"
|
||||
assert_output_contains "*******" 2
|
||||
assert_output_not_contains "test@example.com"
|
||||
assert_output_not_contains "secret-key"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user