[PATCH v2 1/2] t9901-git-web--browse.sh: Use "write_script" helper
- From
Alexey Shumkin <alex.crezoff@gmail.com>
- Date
- Jan 26, 2013, 00:40 UTC
- Message-ID
- <c4cde7280a34d1a636c2eb93cfec6ce2f4ac222f.1359160531.git.Alex.Crezoff@gmail.com>
- In-Reply-To
- <cover.1359160531.git.Alex.Crezoff@gmail.com>
Use "write_script" helper as suggested by Junio C Hamano. Also, replace `pwd` with $(pwd) call convention.
Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Alexey Shumkin <Alex.Crezoff@gmail.com> --- 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