Skip to content

Commit 0a6cb5c

Browse files
john-caigitster
authored andcommitted
t3500-cherry: modernize test format
Some tests still use the old format with four spaces indentation. Standardize the tests to the new format with tab indentation. Signed-off-by: John Cai <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 350c484 commit 0a6cb5c

File tree

1 file changed

+33
-36
lines changed

1 file changed

+33
-36
lines changed

t/t3500-cherry.sh

Lines changed: 33 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -16,46 +16,43 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
1616
GIT_AUTHOR_EMAIL=bogus_email_address
1717
export GIT_AUTHOR_EMAIL
1818

19-
test_expect_success \
20-
'prepare repository with topic branch, and check cherry finds the 2 patches from there' \
21-
'echo First > A &&
22-
git update-index --add A &&
23-
test_tick &&
24-
git commit -m "Add A." &&
25-
26-
git checkout -b my-topic-branch &&
27-
28-
echo Second > B &&
29-
git update-index --add B &&
30-
test_tick &&
31-
git commit -m "Add B." &&
32-
33-
echo AnotherSecond > C &&
34-
git update-index --add C &&
35-
test_tick &&
36-
git commit -m "Add C." &&
37-
38-
git checkout -f main &&
39-
rm -f B C &&
40-
41-
echo Third >> A &&
42-
git update-index A &&
43-
test_tick &&
44-
git commit -m "Modify A." &&
45-
46-
expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* + .*"
19+
test_expect_success 'prepare repository with topic branch, and check cherry finds the 2 patches from there' '
20+
echo First > A &&
21+
git update-index --add A &&
22+
test_tick &&
23+
git commit -m "Add A." &&
24+
25+
git checkout -b my-topic-branch &&
26+
27+
echo Second > B &&
28+
git update-index --add B &&
29+
test_tick &&
30+
git commit -m "Add B." &&
31+
32+
echo AnotherSecond > C &&
33+
git update-index --add C &&
34+
test_tick &&
35+
git commit -m "Add C." &&
36+
37+
git checkout -f main &&
38+
rm -f B C &&
39+
40+
echo Third >> A &&
41+
git update-index A &&
42+
test_tick &&
43+
git commit -m "Modify A." &&
44+
45+
expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* + .*"
4746
'
4847

49-
test_expect_success \
50-
'check that cherry with limit returns only the top patch'\
51-
'expr "$(echo $(git cherry main my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"
48+
test_expect_success 'check that cherry with limit returns only the top patch' '
49+
expr "$(echo $(git cherry main my-topic-branch my-topic-branch^1) )" : "+ [^ ]*"
5250
'
5351

54-
test_expect_success \
55-
'cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' \
56-
'git cherry-pick my-topic-branch^0 &&
57-
echo $(git cherry main my-topic-branch) &&
58-
expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* - .*"
52+
test_expect_success 'cherry-pick one of the 2 patches, and check cherry recognized one and only one as new' '
53+
git cherry-pick my-topic-branch^0 &&
54+
echo $(git cherry main my-topic-branch) &&
55+
expr "$(echo $(git cherry main my-topic-branch) )" : "+ [^ ]* - .*"
5956
'
6057

6158
test_expect_success 'cherry ignores whitespace' '

0 commit comments

Comments
 (0)