diff options
| author | Junio C Hamano <gitster@pobox.com> | 2012-02-13 11:42:07 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2012-02-13 11:42:07 -0800 |
| commit | 8eb865ba8a24aad5380a23fc1e331aba2f7c5bbb (patch) | |
| tree | c995cd1c09a8faed705a3fcf5f77a5b47a5533f2 /t/test-lib.sh | |
| parent | a78f5582fca15950eb43f93b246e3778d0ae84da (diff) | |
| parent | c2d17ba3db0d2b14daf04e69a8c5ec73b023c1fe (diff) | |
Merge branch 'jc/branch-desc-typoavoidance' into maint
* jc/branch-desc-typoavoidance:
branch --edit-description: protect against mistyped branch name
tests: add write_script helper function
Diffstat (limited to 't/test-lib.sh')
| -rw-r--r-- | t/test-lib.sh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index a65dfc7ea9..a089a18864 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -381,11 +381,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: # |
