#!/usr/bin/env bash # # Converts assertion failure text involving two mutations to a diff. # # Usage: mutation_diff # function filter { sed 's/@0x[0-9a-f]*//g' } colordiff -u <(sed -n '/expected/,/got:/p' $1 | head -n-1 | sed 's/.*expected /&\n/' | filter) \ <(sed -n '/got:/,/^$/p' $1 | sed 's/.*got: /&\n/' | filter) | less -R