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 <johncai86@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
John Cai committed
May 18, 2023 at 20:03 UTC
0a6cb5c42ffad3f20bcc49a9da7ea166441e16c2
1 file changed
+33
-36
t/t3500-cherry.sh
+33
-36
@@ -16,46 +16,43 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
16
GIT_AUTHOR_EMAIL=bogus_email_address
17
export GIT_AUTHOR_EMAIL
18
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) )" : "+ [^ ]* + .*"
46
'
47
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) )" : "+ [^ ]*"
50
'
51
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) )" : "+ [^ ]* - .*"
56
'
57
58
test_expect_success 'cherry ignores whitespace' '