From 08c5eb7ac0167e5932f2456df3dcebd0712d63a9 Mon Sep 17 00:00:00 2001 From: Pete Wyckoff Date: Wed, 27 Jun 2012 08:00:56 -0400 Subject: 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 Signed-off-by: Junio C Hamano --- t/t9800-git-p4-basic.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 't/t9800-git-p4-basic.sh') diff --git a/t/t9800-git-p4-basic.sh b/t/t9800-git-p4-basic.sh index 0f410c45f7..7401c21562 100755 --- a/t/t9800-git-p4-basic.sh +++ b/t/t9800-git-p4-basic.sh @@ -126,15 +126,14 @@ test_expect_success 'clone two dirs, @all, conflicting files' ' ' test_expect_success 'exit when p4 fails to produce marshaled output' ' - badp4dir="$TRASH_DIRECTORY/badp4dir" && - mkdir "$badp4dir" && - test_when_finished "rm \"$badp4dir/p4\" && rmdir \"$badp4dir\"" && - cat >"$badp4dir"/p4 <<-EOF && + mkdir badp4dir && + test_when_finished "rm badp4dir/p4 && rmdir badp4dir" && + cat >badp4dir/p4 <<-EOF && #!$SHELL_PATH exit 1 EOF - chmod 755 "$badp4dir"/p4 && - PATH="$badp4dir:$PATH" git p4 clone --dest="$git" //depot >errs 2>&1 ; retval=$? && + chmod 755 badp4dir/p4 && + PATH="$TRASH_DIRECTORY/badp4dir:$PATH" git p4 clone --dest="$git" //depot >errs 2>&1 ; retval=$? && test $retval -eq 1 && test_must_fail grep -q Traceback errs ' -- cgit v1.2.3