Fix/improve tests (#9859)

* Fix tests.

* Improve callback tests.
This commit is contained in:
Felix Fontein 2025-03-09 16:48:36 +01:00 committed by GitHub
commit eff25c8a6e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
28 changed files with 187 additions and 157 deletions

View file

@ -469,8 +469,10 @@
- '(pkgng_example8_invalid_annotation_failure.results | selectattr("changed") | list | count) == 0'
# Invalid strings should always fail
- '(pkgng_example8_invalid_annotation_failure.results | rejectattr("failed") | list | count) == 0'
# Invalid strings should not cause an exception
- '(pkgng_example8_invalid_annotation_failure.results | selectattr("exception", "defined") | list | count) == 0'
# Invalid strings should not cause a module crash
- '(pkgng_example8_invalid_annotation_failure.results | selectattr("module_stdout", "defined") | list | count) == 0'
# Invalid strings should have a proper msg field
- '(pkgng_example8_invalid_annotation_failure.results | selectattr("msg", "match", "failed to annotate zsh, invalid annotate string: .*") | list | count) == 4'
# Verify annotations are unaffected
- '(pkgng_example8_invalid_annotation_verify.stdout_lines | select("search", "(naked_string|invalid_operation|empty_first_tag|validsecond|notag)") | list | count) == 0'