diff options
| author | Kristofer Karlsson <krka@spotify.com> | 2026-08-11 09:28:44 +0000 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-08-11 07:34:31 -0700 |
| commit | fe4877bc17b1dd5b25b9444eadee20ec5fa8bf83 (patch) | |
| tree | 0f53b1c2b318e99f2824cb749c22001b202c97de /t/t4013/diff.diff_initial..side | |
| parent | cd2ab0e12896ef505f4be8822788912fe95394eb (diff) | |
test-lib-functions: improve diagnostic output for trace2 data assertions
test_trace2_data is a bare grep that silently exits on failure.
Add a more informative variant that verifies the event appears
exactly once and reports what went wrong: key not found, multiple
entries, or value mismatch. Diagnostics go to FD 4 like test_grep.
Before (value mismatch):
$ test_trace2_data status count/changed 999 <trace2.txt
$ echo $?
1
(no output)
After:
$ test_trace2_data_singular status count/changed 999 <trace2.txt
error: trace2 data 'status/count/changed'
expected: 999
actual: 0
Signed-off-by: Kristofer Karlsson <krka@spotify.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.diff_initial..side')
0 files changed, 0 insertions, 0 deletions
