Re: [PATCH 1/3] t7006: add tests for how git config paginates

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Ågren <martin.agren@xxxxxxxxx> writes:

> +test_expect_success TTY 'git config respects pager.config when setting' '
> +	rm -f paginated.out &&
> +	test_terminal git -c pager.config config foo.bar bar &&
> +	test -e paginated.out
> +'

I am debating myself if this test should instead spell out what we
eventually want from the above test and make it expect_failure, just
like the next one.

In addition to setting (which will start ignoring pager in later
steps), unsetting, replacing of a variable and renaming/removing a
section in a configuration should not page, I would suspect.  Should
we test them all?

> +test_expect_failure TTY 'git config --edit ignores pager.config' '
> +	rm -f paginated.out editor.used &&
> +	write_script editor <<-\EOF &&
> +		touch editor.used
> +	EOF
> +	EDITOR=./editor test_terminal git -c pager.config config --edit &&
> +	! test -e paginated.out &&
> +	test -e editor.used
> +'
> +
> +test_expect_success TTY 'git config --get defaults to not paging' '
> +	rm -f paginated.out &&
> +	test_terminal git config --get foo.bar &&
> +	! test -e paginated.out
> +'
> +
> +test_expect_success TTY 'git config --get respects pager.config' '
> +	rm -f paginated.out &&
> +	test_terminal git -c pager.config config --get foo.bar &&
> +	test -e paginated.out
> +'
> +
> +test_expect_success TTY 'git config --list defaults to not paging' '
> +	rm -f paginated.out &&
> +	test_terminal git config --list &&
> +	! test -e paginated.out
> +'
> +
> +
>  # A colored commit log will begin with an appropriate ANSI escape
>  # for the first color; the text "commit" comes later.
>  colorful() {



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux