From d4e08e4e87ec1578ba99c860caf145d7f929ccda Mon Sep 17 00:00:00 2001 From: Johannes Schindelin Date: Fri, 30 Jun 2017 22:32:33 +0200 Subject: [PATCH] tests (mingw): remove Bash-specific pwd option The -W option is only understood by MSYS2 Bash's pwd command. We already make sure to override `pwd` by `builtin pwd -W` for MINGW, so let's not double the effort here. This will also help when switching the shell to another one (such as BusyBox' ash) whose pwd does *not* understand the -W option. Signed-off-by: Johannes Schindelin --- t/t2029-checkout-long-paths.sh | 2 +- t/t3700-add.sh | 2 +- t/t9902-completion.sh | 7 +------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/t/t2029-checkout-long-paths.sh b/t/t2029-checkout-long-paths.sh index 01e5303a1a..f30f8920ca 100755 --- a/t/t2029-checkout-long-paths.sh +++ b/t/t2029-checkout-long-paths.sh @@ -59,7 +59,7 @@ test_expect_success cleanup ' ' # check that the template used in the test won't be too long: -abspath="$(pwd -W)"/testdir +abspath="$(pwd)"/testdir test ${#abspath} -gt 230 || test_set_prereq SHORTABSPATH diff --git a/t/t3700-add.sh b/t/t3700-add.sh index a8b65d2dbd..65959ebc0c 100755 --- a/t/t3700-add.sh +++ b/t/t3700-add.sh @@ -404,7 +404,7 @@ test_expect_success 'all statuses changed in folder if . is given' ' ' test_expect_success MINGW 'path is case-insensitive' ' - path="$(pwd -W)/BLUB" && + path="$(pwd)/BLUB" && touch "$path" && downcased="$(echo "$path" | tr A-Z a-z)" && git add "$downcased" diff --git a/t/t9902-completion.sh b/t/t9902-completion.sh index b7f5b1e632..819b639c85 100755 --- a/t/t9902-completion.sh +++ b/t/t9902-completion.sh @@ -124,12 +124,7 @@ invalid_variable_name='${foo.bar}' actual="$TRASH_DIRECTORY/actual" -if test_have_prereq MINGW -then - ROOT="$(pwd -W)" -else - ROOT="$(pwd)" -fi +ROOT="$(pwd)" test_expect_success 'setup for __git_find_repo_path/__gitdir tests' ' mkdir -p subdir/subsubdir &&