Skip to content

Commit 8a557bb

Browse files
trastgitster
authored andcommitted
t5704: match tests to modern style
The test did not adhere to the current style on several counts: . empty lines around the test blocks, but within the test string . ': > file' or even just '> file' with an extra space . inconsistent indentation . hand-rolled commits instead of using test_commit Fix all of them. There's a catch to the last point: test_commit creates a tag, which the original test did not create. We still change it to test_commit, and explicitly delete the tags, so as to highlight that the test relies on not having them. Signed-off-by: Thomas Rast <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 1c5f93b commit 8a557bb

File tree

1 file changed

+8
-25
lines changed

1 file changed

+8
-25
lines changed

t/t5704-bundle.sh

Lines changed: 8 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,59 +4,42 @@ test_description='some bundle related tests'
44
. ./test-lib.sh
55

66
test_expect_success 'setup' '
7-
8-
: > file &&
9-
git add file &&
10-
test_tick &&
11-
git commit -m initial &&
7+
test_commit initial &&
128
test_tick &&
139
git tag -m tag tag &&
14-
: > file2 &&
15-
git add file2 &&
16-
: > file3 &&
17-
test_tick &&
18-
git commit -m second &&
19-
git add file3 &&
20-
test_tick &&
21-
git commit -m third
22-
10+
test_commit second &&
11+
test_commit third &&
12+
git tag -d initial &&
13+
git tag -d second &&
14+
git tag -d third
2315
'
2416

2517
test_expect_success 'tags can be excluded by rev-list options' '
26-
2718
git bundle create bundle --all --since=7.Apr.2005.15:16:00.-0700 &&
2819
git ls-remote bundle > output &&
2920
! grep tag output
30-
3121
'
3222

3323
test_expect_success 'die if bundle file cannot be created' '
34-
3524
mkdir adir &&
3625
test_must_fail git bundle create adir --all
37-
3826
'
3927

4028
test_expect_failure 'bundle --stdin' '
41-
4229
echo master | git bundle create stdin-bundle.bdl --stdin &&
4330
git ls-remote stdin-bundle.bdl >output &&
4431
grep master output
45-
4632
'
4733

4834
test_expect_failure 'bundle --stdin <rev-list options>' '
49-
5035
echo master | git bundle create hybrid-bundle.bdl --stdin tag &&
5136
git ls-remote hybrid-bundle.bdl >output &&
5237
grep master output
53-
5438
'
5539

5640
test_expect_success 'empty bundle file is rejected' '
57-
58-
>empty-bundle && test_must_fail git fetch empty-bundle
59-
41+
: >empty-bundle &&
42+
test_must_fail git fetch empty-bundle
6043
'
6144

6245
# This triggers a bug in older versions where the resulting line (with

0 commit comments

Comments
 (0)