Karthik Nayak <karthik....@gmail.com> writes:

> --- a/t/t6302-for-each-ref-filter.sh
> +++ b/t/t6302-for-each-ref-filter.sh
> @@ -81,4 +81,20 @@ test_expect_success 'filtering with --contains' '
>       test_cmp expect actual
>  '
>  
> +test_expect_success 'padding to the right using `padright`' '
> +     cat >expect <<-\EOF &&
> +     refs/heads/master        |
> +     refs/heads/side          |
> +     refs/odd/spot            |
> +     refs/tags/double-tag     |
> +     refs/tags/four           |
> +     refs/tags/one            |
> +     refs/tags/signed-tag     |
> +     refs/tags/three          |
> +     refs/tags/two            |
> +     EOF
> +     git for-each-ref --format="%(padright:25)%(refname)|" >actual &&
> +     test_cmp expect actual
> +'
> +
>  test_done

See my remark on previous patch: this test is not sufficient. You do
not only need to check that %(padright) is taken into account, but you
also need to check that it is taken into account for the right atom and
only this one. I'd suggest

--format '%(refname)%(padright:25)|%(refname)|%(refname)|'

Only the middle column should be padded.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to