-
- Downloads
tests: Add helpers for showing string diffs
`_srt_show_diff` will run an external diff tool on both of the given strings, and `_srt_assert_streq_diff` is a lightweight macro to perform assert equality but use `_srt_show_diff` on error. This is largely based on the diff-ing code from `tests/system-info-cli.c` (ad877aae), with some changes: - _srt_async_signal_safe_error is an internal function, so it uses `GSubprocessLauncher` to be able to redirect stdout to stderr instead. - Supports reading the diff tool and options from `$SRT_DIFF` and `$SRT_DIFF_OPTS`, respectively, to make room for using alternate diff tools on hairier test failures. Signed-off-by:Ryan Gonzalez <ryan.gonzalez@collabora.com>
parent
6b90d459
No related branches found
No related tags found
Please register or sign in to comment