Files
scylladb/tests/mutation_diff
Tomasz Grabiec c3276451af tests: Introduce mutation_diff script
Converts assertion failure messages which spit out mutation contents
into a human-readable diff.
2017-12-01 10:52:37 +01:00

10 lines
258 B
Bash
Executable File

#!/usr/bin/env bash
#
# Converts assertion failure text involving two mutations to a diff.
#
# Usage: mutation_diff <path-to-test-output-file>
#
colordiff -u <(sed -n '/expected/,/got:/p' $1 | head -n-1) \
<(sed -n '/got:/,/^$/p' $1) | less -R