# Re: \[PATCH\] diff-highlight: add some tests.

- From: Junio C Hamano \<hidden\>
- Date: 2016-08-19 21:05:24 
- List: git
- Page: https://ratatoskr.run/git/2016/08/7693884
- Thread: https://ratatoskr.run/git/2016/08/7693884/t.md

```text
Brian Henderson [ref] writes:

> +# dh_test is a test helper function which takes 1) some file data, 2) some
> +# change of the file data, creates a diff and commit of the changes and passes
> +# that through diff-highlight.
> +# The optional 3rd parameter is the expected output of diff-highlight minus the
> +# diff/commit header. This parameter is given directly to printf as the format
> +# string (in order to properly handle ascii escape codes; CW, CR), so any '%'
> +# need to be doubled to protect it.

My mistake.  All three are given directly to printf as the format
string, so it is misleading to single out $3 when warning the
callers about '%'.

Sorry about that.
```
