Skip to content

Commit c8b7c02

Browse files
committed
Merge branch 'cm/t7xxx-cleanup'
Micro clean-up. * cm/t7xxx-cleanup: t7102: prepare expected output inside test_expect_* block t7201: put each command on a separate line t7201: use 'git -C' to avoid subshell t7102,t7201: remove whitespace after redirect operator t7102,t7201: remove unnecessary blank spaces in test body t7101,t7102,t7201: modernize test formatting
2 parents a42035f + 31f4c83 commit c8b7c02

File tree

3 files changed

+217
-258
lines changed

3 files changed

+217
-258
lines changed

t/t7101-reset-empty-subdirs.sh

Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@
66
test_description='git reset should cull empty subdirs'
77
. ./test-lib.sh
88

9-
test_expect_success \
10-
'creating initial files' \
11-
'mkdir path0 &&
9+
test_expect_success 'creating initial files' '
10+
mkdir path0 &&
1211
cp "$TEST_DIRECTORY"/../COPYING path0/COPYING &&
1312
git add path0/COPYING &&
14-
git commit -m add -a'
13+
git commit -m add -a
14+
'
1515

16-
test_expect_success \
17-
'creating second files' \
18-
'mkdir path1 &&
16+
test_expect_success 'creating second files' '
17+
mkdir path1 &&
1918
mkdir path1/path2 &&
2019
cp "$TEST_DIRECTORY"/../COPYING path1/path2/COPYING &&
2120
cp "$TEST_DIRECTORY"/../COPYING path1/COPYING &&
@@ -25,39 +24,40 @@ test_expect_success \
2524
git add path1/COPYING &&
2625
git add COPYING &&
2726
git add path0/COPYING-TOO &&
28-
git commit -m change -a'
27+
git commit -m change -a
28+
'
2929

30-
test_expect_success \
31-
'resetting tree HEAD^' \
32-
'git reset --hard HEAD^'
30+
test_expect_success 'resetting tree HEAD^' '
31+
git reset --hard HEAD^
32+
'
3333

34-
test_expect_success \
35-
'checking initial files exist after rewind' \
36-
'test -d path0 &&
37-
test -f path0/COPYING'
34+
test_expect_success 'checking initial files exist after rewind' '
35+
test -d path0 &&
36+
test -f path0/COPYING
37+
'
3838

39-
test_expect_success \
40-
'checking lack of path1/path2/COPYING' \
41-
'! test -f path1/path2/COPYING'
39+
test_expect_success 'checking lack of path1/path2/COPYING' '
40+
! test -f path1/path2/COPYING
41+
'
4242

43-
test_expect_success \
44-
'checking lack of path1/COPYING' \
45-
'! test -f path1/COPYING'
43+
test_expect_success 'checking lack of path1/COPYING' '
44+
! test -f path1/COPYING
45+
'
4646

47-
test_expect_success \
48-
'checking lack of COPYING' \
49-
'! test -f COPYING'
47+
test_expect_success 'checking lack of COPYING' '
48+
! test -f COPYING
49+
'
5050

51-
test_expect_success \
52-
'checking checking lack of path1/COPYING-TOO' \
53-
'! test -f path0/COPYING-TOO'
51+
test_expect_success 'checking checking lack of path1/COPYING-TOO' '
52+
! test -f path0/COPYING-TOO
53+
'
5454

55-
test_expect_success \
56-
'checking lack of path1/path2' \
57-
'! test -d path1/path2'
55+
test_expect_success 'checking lack of path1/path2' '
56+
! test -d path1/path2
57+
'
5858

59-
test_expect_success \
60-
'checking lack of path1' \
61-
'! test -d path1'
59+
test_expect_success 'checking lack of path1' '
60+
! test -d path1
61+
'
6262

6363
test_done

0 commit comments

Comments
 (0)