summaryrefslogtreecommitdiff
path: root/t/t0001-init.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-11-09 14:31:31 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-11-09 14:31:31 +0900
commit421f21c98f8b515412ca683ae3743013a8b3bda2 (patch)
tree32b2eea74f001bfc03680b016b8e36367fd66130 /t/t0001-init.sh
parentMerge branch 'js/wincred-empty-cred' (diff)
parentmingw: document the standard handle redirection (diff)
downloadtgif-421f21c98f8b515412ca683ae3743013a8b3bda2.tar.xz
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-xt/t0001-init.sh12
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