]> git.ipfire.org Git - thirdparty/git.git/commit - t/test-lib-functions.sh
t1300: extract and use test_cmp_config()
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 21 Oct 2018 14:02:27 +0000 (16:02 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 22 Oct 2018 04:17:02 +0000 (13:17 +0900)
commita5db0b77b916014e732155d116575bdffbcbe79b
tree1604474b5e4af2f4afed370c0671de3a50c02fee
parentc4df23f7927d8d00e666a3c8d1b3375f1dc8a3c1
t1300: extract and use test_cmp_config()

In many config-related tests it's common to check if a config variable
has expected value and we want to print the differences when the test
fails. Doing it the normal way is three lines of shell code. Let's add
a function do to all this (and a little more).

This function has uses outside t1300 as well but I'm not going to
convert them all. And it will be used in the next commit where
per-worktree config feature is introduced.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t1300-config.sh
t/test-lib-functions.sh