t5602 (clone-remote-exec): add missing &&
Also add a couple test_must_fail invocations where needed, and avoid one-shot environment variable export and function calls. Acked-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Reviewed-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Oct 3, 2010 at 14:00 UTC
771cf1dab9303bab3c8198b8b631ca6e7093917d
1 file changed
+15
-7
t/t5602-clone-remote-exec.sh
+15
-7
@@ -5,21 +5,29 @@ test_description=clone
5
. ./test-lib.sh
6
7
test_expect_success setup '
8
- echo "#!/bin/sh" > not_ssh
9
- echo "echo \"\$*\" > not_ssh_output" >> not_ssh
10
- echo "exit 1" >> not_ssh
8
+ echo "#!/bin/sh" > not_ssh &&
9
+ echo "echo \"\$*\" > not_ssh_output" >> not_ssh &&
10
+ echo "exit 1" >> not_ssh &&
11
chmod +x not_ssh
12
'
13
14
test_expect_success 'clone calls git upload-pack unqualified with no -u option' '
15
- GIT_SSH=./not_ssh git clone localhost:/path/to/repo junk
16
- echo "localhost git-upload-pack '\''/path/to/repo'\''" >expected
15
+ (
16
+ GIT_SSH=./not_ssh &&
17
+ export GIT_SSH &&
18
+ test_must_fail git clone localhost:/path/to/repo junk
19
+ ) &&
20
+ echo "localhost git-upload-pack '\''/path/to/repo'\''" >expected &&
21
test_cmp expected not_ssh_output
22
'
23
24
test_expect_success 'clone calls specified git upload-pack with -u option' '
21
- GIT_SSH=./not_ssh git clone -u ./something/bin/git-upload-pack localhost:/path/to/repo junk
22
- echo "localhost ./something/bin/git-upload-pack '\''/path/to/repo'\''" >expected
25
+ (
26
+ GIT_SSH=./not_ssh &&
27
+ export GIT_SSH &&
28
+ test_must_fail git clone -u ./something/bin/git-upload-pack localhost:/path/to/repo junk
29
+ ) &&
30
+ echo "localhost ./something/bin/git-upload-pack '\''/path/to/repo'\''" >expected &&
31
test_cmp expected not_ssh_output
32
'
33