diff options
| author | Junio C Hamano <gitster@pobox.com> | 2017-11-09 14:31:31 +0900 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2017-11-09 14:31:31 +0900 |
| commit | 421f21c98f8b515412ca683ae3743013a8b3bda2 (patch) | |
| tree | 32b2eea74f001bfc03680b016b8e36367fd66130 /t/t0001-init.sh | |
| parent | 55b5d92092ac68824a5502aeb83b9176ee8e2890 (diff) | |
| parent | b2f55717c7f9b335b7ac2e3358b0498116b94a5d (diff) | |
| download | git-421f21c98f8b515412ca683ae3743013a8b3bda2.tar.gz | |
Merge branch 'js/mingw-redirect-std-handles'
MinGW updates.
* js/mingw-redirect-std-handles:
mingw: document the standard handle redirection
mingw: optionally redirect stderr/stdout via the same handle
mingw: add experimental feature to redirect standard handles
Diffstat (limited to 't/t0001-init.sh')
| -rwxr-xr-x | t/t0001-init.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t0001-init.sh b/t/t0001-init.sh index 86c1a51654..c413bff9cf 100755 --- a/t/t0001-init.sh +++ b/t/t0001-init.sh @@ -453,4 +453,16 @@ test_expect_success 're-init from a linked worktree' ' ) ' +test_expect_success MINGW 'redirect std handles' ' + GIT_REDIRECT_STDOUT=output.txt git rev-parse --git-dir && + test .git = "$(cat output.txt)" && + test -z "$(GIT_REDIRECT_STDOUT=off git rev-parse --git-dir)" && + test_must_fail env \ + GIT_REDIRECT_STDOUT=output.txt \ + GIT_REDIRECT_STDERR="2>&1" \ + git rev-parse --git-dir --verify refs/invalid && + printf ".git\nfatal: Needed a single revision\n" >expect && + test_cmp expect output.txt +' + test_done |
