summaryrefslogtreecommitdiff
path: root/t/t9805-git-p4-skip-submit-edit.sh
diff options
context:
space:
mode:
authorPete Wyckoff <pw@padd.com>2012-06-27 08:00:56 -0400
committerJunio C Hamano <gitster@pobox.com>2012-06-27 21:06:34 -0700
commit08c5eb7ac0167e5932f2456df3dcebd0712d63a9 (patch)
treed24129e9b3be83e7eee0136d8ec578b2fa2e26fd /t/t9805-git-p4-skip-submit-edit.sh
parent23bd0c99f7b789077c40ae5384dd0054ef5c00ac (diff)
downloadgit-08c5eb7ac0167e5932f2456df3dcebd0712d63a9.tar.gz
git p4 test: simplify quoting involving TRASH_DIRECTORY
For temporary files that are created in the top-level TRASH_DIRECTORY, trust that the tests do not chdir except in subshells, and avoid some quoting. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t9805-git-p4-skip-submit-edit.sh')
-rwxr-xr-xt/t9805-git-p4-skip-submit-edit.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/t/t9805-git-p4-skip-submit-edit.sh b/t/t9805-git-p4-skip-submit-edit.sh
index 353dcfbe09..fb3c8ec12c 100755
--- a/t/t9805-git-p4-skip-submit-edit.sh
+++ b/t/t9805-git-p4-skip-submit-edit.sh
@@ -78,20 +78,19 @@ test_expect_success 'skipSubmitEditCheck' '
test_expect_success 'no config, edited' '
git p4 clone --dest="$git" //depot &&
test_when_finished cleanup_git &&
- ed="$TRASH_DIRECTORY/ed.sh" &&
- test_when_finished "rm \"$ed\"" &&
- cat >"$ed" <<-EOF &&
+ test_when_finished "rm ed.sh" &&
+ cat >ed.sh <<-EOF &&
#!$SHELL_PATH
sleep 1
touch "\$1"
exit 0
EOF
- chmod 755 "$ed" &&
+ chmod 755 ed.sh &&
(
cd "$git" &&
echo line >>file1 &&
git commit -a -m "change 5" &&
- P4EDITOR="" EDITOR="\"$ed\"" git p4 submit &&
+ P4EDITOR="" EDITOR="\"$TRASH_DIRECTORY/ed.sh\"" git p4 submit &&
p4 changes //depot/... >wc &&
test_line_count = 5 wc
)