Use "write_script" helper as suggested by Junio C Hamano.
Also, replace `pwd` with $(pwd) call convention.
Suggested-by: Junio C Hamano <redacted>
Signed-off-by: Alexey Shumkin <redacted>
---
t/t9901-git-web--browse.sh | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/t/t9901-git-web--browse.sh b/t/t9901-git-web--browse.sh
index b0a6bad..b0dabf7 100755
--- a/t/t9901-git-web--browse.sh
+++ b/t/t9901-git-web--browse.sh
@@ -38,12 +38,10 @@ test_expect_success \
test_expect_success \
'browser paths are properly quoted' '
echo fake: http://example.com/foo >expect &&
- cat >"fake browser" <<-\EOF &&
- #!/bin/sh
+ write_script "fake browser" <<-\EOF &&
echo fake: "$@"
EOF
- chmod +x "fake browser" &&
- git config browser.w3m.path "`pwd`/fake browser" &&
+ git config browser.w3m.path "$(pwd)/fake browser" &&
test_web_browse w3m http://example.com/foo
'
--
1.8.1.1.10.g71fa0b7