Skip to content

Commit

Permalink
test harness: When the cardinality check fails, pretty-print \$expect…
Browse files Browse the repository at this point in the history
…ed_region_highlight and \$region_highlight.
  • Loading branch information
danielshahaf committed Mar 17, 2020
1 parent e6eea1f commit bdb4e8b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test-highlighting.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ run_test_internal() {
details+="«$(typeset_p expected_region_highlight)» «$(typeset_p region_highlight)»"
tap_escape $details; details=$REPLY
print -r -- "not ok $i - cardinality check - $details${todo:+ - }$todo"
paste \
=(print -rC1 -- "expected_region_highlight" "${(qq)expected_region_highlight[@]}") \
=(print -rC1 -- "region_highlight" "${(qq)region_highlight[@]}") \
| if type column >/dev/null; then column -t -s $'\t'; else cat; fi \
| sed 's/^/# /'
fi
fi
}
Expand Down

0 comments on commit bdb4e8b

Please sign in to comment.