aboutsummaryrefslogtreecommitdiff
path: root/t/t7502-commit.sh
diff options
context:
space:
mode:
authorBrandon Casey <casey@nrlssc.navy.mil>2008-07-22 16:21:10 -0500
committerJunio C Hamano <gitster@pobox.com>2008-07-23 11:36:31 -0700
commit09b78bc1fc4e525bc68fa0ce76521457717fe675 (patch)
treec7c1914fc4e87856eaf75d1fbf13928d2ad0521b /t/t7502-commit.sh
parent03b9dfb18ba451a2221601b740004befa7614c5b (diff)
downloadgit-09b78bc1fc4e525bc68fa0ce76521457717fe675.tar.gz
git-09b78bc1fc4e525bc68fa0ce76521457717fe675.tar.xz
t7502-commit.sh: rearrange test to make more portable
Some shells have problems with one-shot environment variable export and function calls. The sequence is rearranged to avoid the one-shot and to allow the test script to be linked together with '&&'. Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t7502-commit.sh')
-rwxr-xr-xt/t7502-commit.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index c25eff9e4..4f2682ea8 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -228,10 +228,12 @@ EOF
test_expect_success 'a SIGTERM should break locks' '
echo >>negative &&
- "$SHELL_PATH" -c '\''
+ ! "$SHELL_PATH" -c '\''
echo kill -TERM $$ >> .git/FAKE_EDITOR
- GIT_EDITOR=.git/FAKE_EDITOR exec git commit -a'\'' && exit 1 # should fail
- ! test -f .git/index.lock
+ GIT_EDITOR=.git/FAKE_EDITOR
+ export GIT_EDITOR
+ exec git commit -a'\'' &&
+ test ! -f .git/index.lock
'
rm -f .git/MERGE_MSG .git/COMMIT_EDITMSG