X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ftest-lib.sh;h=e28d5fdebe21f33b91942ce00125cc215f6427fd;hb=e06ed3ed8a72cadb2c3f9695825c827c1584549d;hp=b22bee7c8448542cdadac36e7ac91b71a63aa7c2;hpb=1e9d3e3663105d695969a26644e1251065824b5e;p=git.git diff --git a/t/test-lib.sh b/t/test-lib.sh index b22bee7c8..e28d5fdeb 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -395,11 +395,20 @@ test_config () { git config "$@" } + test_config_global () { test_when_finished "test_unconfig --global '$1'" && git config --global "$@" } +write_script () { + { + echo "#!${2-"$SHELL_PATH"}" && + cat + } >"$1" && + chmod +x "$1" +} + # Use test_set_prereq to tell that a particular prerequisite is available. # The prerequisite can later be checked for in two ways: #