tests: modernise style: more uses of test_line_count
Prefer: test_line_count <OP> COUNT FILE over: test $(wc -l <FILE) <OP> COUNT (or similar usages) in several tests. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Stefano Lattarini committed
Apr 11, 2012 at 13:24 UTC
3fb0459bc89bebb07e0603ce3ce92dbbc8a39ea4
19 files changed
+65
-74
t/t1410-reflog.sh
+8
-18
@@ -100,8 +100,7 @@ test_expect_success setup '
100
101
check_fsck &&
102
103
- loglen=$(wc -l <.git/logs/refs/heads/master) &&
104
- test $loglen = 4
103
+ test_line_count = 4 .git/logs/refs/heads/master
104
'
105
106
test_expect_success rewind '
@@ -117,8 +116,7 @@ test_expect_success rewind '
116
117
check_have A B C D E F G H I J K L &&
118
120
- loglen=$(wc -l <.git/logs/refs/heads/master) &&
121
- test $loglen = 5
119
+ test_line_count = 5 .git/logs/refs/heads/master
120
'
121
122
test_expect_success 'corrupt and check' '
@@ -136,8 +134,7 @@ test_expect_success 'reflog expire --dry-run should not touch reflog' '
134
--stale-fix \
135
--all &&
136
139
- loglen=$(wc -l <.git/logs/refs/heads/master) &&
140
- test $loglen = 5 &&
137
+ test_line_count = 5 .git/logs/refs/heads/master &&
138
139
check_fsck "missing blob $F"
140
'
@@ -150,8 +147,7 @@ test_expect_success 'reflog expire' '
147
--stale-fix \
148
--all &&
149
153
- loglen=$(wc -l <.git/logs/refs/heads/master) &&
154
- test $loglen = 2 &&
150
+ test_line_count = 2 .git/logs/refs/heads/master &&
151
152
check_fsck "dangling commit $K"
153
'
@@ -217,9 +213,7 @@ test_expect_success 'delete' '
213
test_expect_success 'rewind2' '
214
215
test_tick && git reset --hard HEAD~2 &&
220
- loglen=$(wc -l <.git/logs/refs/heads/master) &&
221
- test $loglen = 4
222
-
216
+ test_line_count = 4 .git/logs/refs/heads/master
217
'
218
219
test_expect_success '--expire=never' '
@@ -228,9 +222,7 @@ test_expect_success '--expire=never' '
222
--expire=never \
223
--expire-unreachable=never \
224
--all &&
231
- loglen=$(wc -l <.git/logs/refs/heads/master) &&
232
- test $loglen = 4
233
-
225
+ test_line_count = 4 .git/logs/refs/heads/master
226
'
227
228
test_expect_success 'gc.reflogexpire=never' '
@@ -238,8 +230,7 @@ test_expect_success 'gc.reflogexpire=never' '
230
git config gc.reflogexpire never &&
231
git config gc.reflogexpireunreachable never &&
232
git reflog expire --verbose --all &&
241
- loglen=$(wc -l <.git/logs/refs/heads/master) &&
242
- test $loglen = 4
233
+ test_line_count = 4 .git/logs/refs/heads/master
234
'
235
236
test_expect_success 'gc.reflogexpire=false' '
@@ -247,8 +238,7 @@ test_expect_success 'gc.reflogexpire=false' '
238
git config gc.reflogexpire false &&
239
git config gc.reflogexpireunreachable false &&
240
git reflog expire --verbose --all &&
250
- loglen=$(wc -l <.git/logs/refs/heads/master) &&
251
- test $loglen = 4 &&
241
+ test_line_count = 4 .git/logs/refs/heads/master &&
242
243
git config --unset gc.reflogexpire &&
244
git config --unset gc.reflogexpireunreachable
t/t2004-checkout-cache-temp.sh
+10
-10
@@ -40,7 +40,7 @@ test_expect_success \
40
rm -f path* .merge_* out .git/index &&
41
git read-tree $t1 &&
42
git checkout-index --temp -- path1 >out &&
43
-test $(wc -l <out) = 1 &&
43
+test_line_count = 1 out &&
44
test $(cut "-d " -f2 out) = path1 &&
45
p=$(cut "-d " -f1 out) &&
46
test -f $p &&
@@ -51,7 +51,7 @@ test_expect_success \
51
rm -f path* .merge_* out .git/index &&
52
git read-tree $t1 &&
53
git checkout-index -a --temp >out &&
54
-test $(wc -l <out) = 5 &&
54
+test_line_count = 5 out &&
55
for f in path0 path1 path3 path4 asubdir/path5
56
do
57
test $(grep $f out | cut "-d " -f2) = $f &&
@@ -69,7 +69,7 @@ test_expect_success \
69
'checkout one stage 2 to temporary file' '
70
rm -f path* .merge_* out &&
71
git checkout-index --stage=2 --temp -- path1 >out &&
72
-test $(wc -l <out) = 1 &&
72
+test_line_count = 1 out &&
73
test $(cut "-d " -f2 out) = path1 &&
74
p=$(cut "-d " -f1 out) &&
75
test -f $p &&
@@ -79,7 +79,7 @@ test_expect_success \
79
'checkout all stage 2 to temporary files' '
80
rm -f path* .merge_* out &&
81
git checkout-index --all --stage=2 --temp >out &&
82
-test $(wc -l <out) = 3 &&
82
+test_line_count = 3 out &&
83
for f in path1 path2 path4
84
do
85
test $(grep $f out | cut "-d " -f2) = $f &&
@@ -92,13 +92,13 @@ test_expect_success \
92
'checkout all stages/one file to nothing' '
93
rm -f path* .merge_* out &&
94
git checkout-index --stage=all --temp -- path0 >out &&
95
-test $(wc -l <out) = 0'
95
+test_line_count = 0 out'
96
97
test_expect_success \
98
'checkout all stages/one file to temporary files' '
99
rm -f path* .merge_* out &&
100
git checkout-index --stage=all --temp -- path1 >out &&
101
-test $(wc -l <out) = 1 &&
101
+test_line_count = 1 out &&
102
test $(cut "-d " -f2 out) = path1 &&
103
cut "-d " -f1 out | (read s1 s2 s3 &&
104
test -f $s1 &&
@@ -112,7 +112,7 @@ test_expect_success \
112
'checkout some stages/one file to temporary files' '
113
rm -f path* .merge_* out &&
114
git checkout-index --stage=all --temp -- path2 >out &&
115
-test $(wc -l <out) = 1 &&
115
+test_line_count = 1 out &&
116
test $(cut "-d " -f2 out) = path2 &&
117
cut "-d " -f1 out | (read s1 s2 s3 &&
118
test $s1 = . &&
@@ -125,7 +125,7 @@ test_expect_success \
125
'checkout all stages/all files to temporary files' '
126
rm -f path* .merge_* out &&
127
git checkout-index -a --stage=all --temp >out &&
128
-test $(wc -l <out) = 5'
128
+test_line_count = 5 out'
129
130
test_expect_success \
131
'-- path0: no entry' '
@@ -185,7 +185,7 @@ test_expect_success \
185
'checkout --temp within subdir' '
186
(cd asubdir &&
187
git checkout-index -a --stage=all >out &&
188
- test $(wc -l <out) = 1 &&
188
+ test_line_count = 1 out &&
189
test $(grep path5 out | cut "-d " -f2) = path5 &&
190
grep path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
191
test -f ../$s1 &&
@@ -203,7 +203,7 @@ t4=$(git write-tree) &&
203
rm -f .git/index &&
204
git read-tree $t4 &&
205
git checkout-index --temp -a >out &&
206
-test $(wc -l <out) = 1 &&
206
+test_line_count = 1 out &&
207
test $(cut "-d " -f2 out) = a &&
208
p=$(cut "-d " -f1 out) &&
209
test -f $p &&
t/t2030-unresolve-info.sh
+1
-1
@@ -113,7 +113,7 @@ test_expect_success 'unmerge with plumbing' '
113
prime_resolve_undo &&
114
git update-index --unresolve fi/le &&
115
git ls-files -u >actual &&
116
- test $(wc -l <actual) = 3
116
+ test_line_count = 3 actual
117
'
118
119
test_expect_success 'rerere and rerere forget' '
t/t3415-rebase-autosquash.sh
+8
-8
@@ -33,7 +33,7 @@ test_auto_fixup () {
33
test_tick &&
34
git rebase $2 -i HEAD^^^ &&
35
git log --oneline >actual &&
36
- test 3 = $(wc -l <actual) &&
36
+ test_line_count = 3 actual &&
37
git diff --exit-code $1 &&
38
test 1 = "$(git cat-file blob HEAD^:file1)" &&
39
test 1 = $(git cat-file commit HEAD^ | grep first | wc -l)
@@ -62,7 +62,7 @@ test_auto_squash () {
62
test_tick &&
63
git rebase $2 -i HEAD^^^ &&
64
git log --oneline >actual &&
65
- test 3 = $(wc -l <actual) &&
65
+ test_line_count = 3 actual &&
66
git diff --exit-code $1 &&
67
test 1 = "$(git cat-file blob HEAD^:file1)" &&
68
test 2 = $(git cat-file commit HEAD^ | grep first | wc -l)
@@ -90,7 +90,7 @@ test_expect_success 'misspelled auto squash' '
90
test_tick &&
91
git rebase --autosquash -i HEAD^^^ &&
92
git log --oneline >actual &&
93
- test 4 = $(wc -l <actual) &&
93
+ test_line_count = 4 actual &&
94
git diff --exit-code final-missquash &&
95
test 0 = $(git rev-list final-missquash...HEAD | wc -l)
96
'
@@ -109,7 +109,7 @@ test_expect_success 'auto squash that matches 2 commits' '
109
test_tick &&
110
git rebase --autosquash -i HEAD~4 &&
111
git log --oneline >actual &&
112
- test 4 = $(wc -l <actual) &&
112
+ test_line_count = 4 actual &&
113
git diff --exit-code final-multisquash &&
114
test 1 = "$(git cat-file blob HEAD^^:file1)" &&
115
test 2 = $(git cat-file commit HEAD^^ | grep first | wc -l) &&
@@ -130,7 +130,7 @@ test_expect_success 'auto squash that matches a commit after the squash' '
130
test_tick &&
131
git rebase --autosquash -i HEAD~4 &&
132
git log --oneline >actual &&
133
- test 5 = $(wc -l <actual) &&
133
+ test_line_count = 5 actual &&
134
git diff --exit-code final-presquash &&
135
test 0 = "$(git cat-file blob HEAD^^:file1)" &&
136
test 1 = "$(git cat-file blob HEAD^:file1)" &&
@@ -147,7 +147,7 @@ test_expect_success 'auto squash that matches a sha1' '
147
test_tick &&
148
git rebase --autosquash -i HEAD^^^ &&
149
git log --oneline >actual &&
150
- test 3 = $(wc -l <actual) &&
150
+ test_line_count = 3 actual &&
151
git diff --exit-code final-shasquash &&
152
test 1 = "$(git cat-file blob HEAD^:file1)" &&
153
test 1 = $(git cat-file commit HEAD^ | grep squash | wc -l)
@@ -163,7 +163,7 @@ test_expect_success 'auto squash that matches longer sha1' '
163
test_tick &&
164
git rebase --autosquash -i HEAD^^^ &&
165
git log --oneline >actual &&
166
- test 3 = $(wc -l <actual) &&
166
+ test_line_count = 3 actual &&
167
git diff --exit-code final-longshasquash &&
168
test 1 = "$(git cat-file blob HEAD^:file1)" &&
169
test 1 = $(git cat-file commit HEAD^ | grep squash | wc -l)
@@ -179,7 +179,7 @@ test_auto_commit_flags () {
179
test_tick &&
180
git rebase --autosquash -i HEAD^^^ &&
181
git log --oneline >actual &&
182
- test 3 = $(wc -l <actual) &&
182
+ test_line_count = 3 actual &&
183
git diff --exit-code final-commit-$1 &&
184
test 1 = "$(git cat-file blob HEAD^:file1)" &&
185
test $2 = $(git cat-file commit HEAD^ | grep first | wc -l)
t/t3900-i18n-commit.sh
+1
-1
@@ -160,7 +160,7 @@ test_commit_autosquash_flags () {
160
git config --unset-all i18n.commitencoding &&
161
git rebase --autosquash -i HEAD^^^ &&
162
git log --oneline >actual &&
163
- test 3 = $(wc -l <actual)
163
+ test_line_count = 3 actual
164
'
165
}
166
t/t4035-diff-quiet.sh
+13
-13
@@ -15,65 +15,65 @@ test_expect_success 'setup' '
15
16
test_expect_success 'git diff-tree HEAD^ HEAD' '
17
git diff-tree --quiet HEAD^ HEAD >cnt
18
- test $? = 1 && test $(wc -l <cnt) = 0
18
+ test $? = 1 && test_line_count = 0 cnt
19
'
20
test_expect_success 'git diff-tree HEAD^ HEAD -- a' '
21
git diff-tree --quiet HEAD^ HEAD -- a >cnt
22
- test $? = 0 && test $(wc -l <cnt) = 0
22
+ test $? = 0 && test_line_count = 0 cnt
23
'
24
test_expect_success 'git diff-tree HEAD^ HEAD -- b' '
25
git diff-tree --quiet HEAD^ HEAD -- b >cnt
26
- test $? = 1 && test $(wc -l <cnt) = 0
26
+ test $? = 1 && test_line_count = 0 cnt
27
'
28
# this diff outputs one line: sha1 of the given head
29
test_expect_success 'echo HEAD | git diff-tree --stdin' '
30
echo $(git rev-parse HEAD) | git diff-tree --quiet --stdin >cnt
31
- test $? = 1 && test $(wc -l <cnt) = 1
31
+ test $? = 1 && test_line_count = 1 cnt
32
'
33
test_expect_success 'git diff-tree HEAD HEAD' '
34
git diff-tree --quiet HEAD HEAD >cnt
35
- test $? = 0 && test $(wc -l <cnt) = 0
35
+ test $? = 0 && test_line_count = 0 cnt
36
'
37
test_expect_success 'git diff-files' '
38
git diff-files --quiet >cnt
39
- test $? = 0 && test $(wc -l <cnt) = 0
39
+ test $? = 0 && test_line_count = 0 cnt
40
'
41
test_expect_success 'git diff-index --cached HEAD' '
42
git diff-index --quiet --cached HEAD >cnt
43
- test $? = 0 && test $(wc -l <cnt) = 0
43
+ test $? = 0 && test_line_count = 0 cnt
44
'
45
test_expect_success 'git diff-index --cached HEAD^' '
46
git diff-index --quiet --cached HEAD^ >cnt
47
- test $? = 1 && test $(wc -l <cnt) = 0
47
+ test $? = 1 && test_line_count = 0 cnt
48
'
49
test_expect_success 'git diff-index --cached HEAD^' '
50
echo text >>b &&
51
echo 3 >c &&
52
git add . && {
53
git diff-index --quiet --cached HEAD^ >cnt
54
- test $? = 1 && test $(wc -l <cnt) = 0
54
+ test $? = 1 && test_line_count = 0 cnt
55
}
56
'
57
test_expect_success 'git diff-tree -Stext HEAD^ HEAD -- b' '
58
git commit -m "text in b" && {
59
git diff-tree --quiet -Stext HEAD^ HEAD -- b >cnt
60
- test $? = 1 && test $(wc -l <cnt) = 0
60
+ test $? = 1 && test_line_count = 0 cnt
61
}
62
'
63
test_expect_success 'git diff-tree -Snot-found HEAD^ HEAD -- b' '
64
git diff-tree --quiet -Snot-found HEAD^ HEAD -- b >cnt
65
- test $? = 0 && test $(wc -l <cnt) = 0
65
+ test $? = 0 && test_line_count = 0 cnt
66
'
67
test_expect_success 'git diff-files' '
68
echo 3 >>c && {
69
git diff-files --quiet >cnt
70
- test $? = 1 && test $(wc -l <cnt) = 0
70
+ test $? = 1 && test_line_count = 0 cnt
71
}
72
'
73
test_expect_success 'git diff-index --cached HEAD' '
74
git update-index c && {
75
git diff-index --quiet --cached HEAD >cnt
76
- test $? = 1 && test $(wc -l <cnt) = 0
76
+ test $? = 1 && test_line_count = 0 cnt
77
}
78
'
79
t/t5100-mailinfo.sh
+1
-1
@@ -65,7 +65,7 @@ test_expect_success 'respect NULs' '
65
git mailsplit -d3 -o. "$TEST_DIRECTORY"/t5100/nul-plain &&
66
test_cmp "$TEST_DIRECTORY"/t5100/nul-plain 001 &&
67
(cat 001 | git mailinfo msg patch) &&
68
- test 4 = $(wc -l < patch)
68
+ test_line_count = 4 patch
69
70
'
71
t/t5700-clone-reference.sh
+2
-2
@@ -34,7 +34,7 @@ test_expect_success 'cloning with reference (-l -s)' \
34
cd "$base_dir"
35
36
test_expect_success 'existence of info/alternates' \
37
-'test `wc -l <C/.git/objects/info/alternates` = 2'
37
+'test_line_count = 2 C/.git/objects/info/alternates'
38
39
cd "$base_dir"
40
@@ -63,7 +63,7 @@ test_expect_success 'fetched no objects' \
63
cd "$base_dir"
64
65
test_expect_success 'existence of info/alternates' \
66
-'test `wc -l <D/.git/objects/info/alternates` = 1'
66
+'test_line_count = 1 D/.git/objects/info/alternates'
67
68
cd "$base_dir"
69
t/t5710-info-alternate.sh
+1
-1
@@ -18,7 +18,7 @@ reachable_via() {
18
19
test_valid_repo() {
20
git fsck --full > fsck.log &&
21
- test `wc -l < fsck.log` = 0
21
+ test_line_count = 0 fsck.log
22
}
23
24
base_dir=`pwd`
t/t6006-rev-list-format.sh
+7
-6
@@ -188,23 +188,23 @@ test_expect_success 'empty email' '
188
189
test_expect_success 'del LF before empty (1)' '
190
git show -s --pretty=format:"%s%n%-b%nThanks%n" HEAD^^ >actual &&
191
- test $(wc -l <actual) = 2
191
+ test_line_count = 2 actual
192
'
193
194
test_expect_success 'del LF before empty (2)' '
195
git show -s --pretty=format:"%s%n%-b%nThanks%n" HEAD >actual &&
196
- test $(wc -l <actual) = 6 &&
196
+ test_line_count = 6 actual &&
197
grep "^$" actual
198
'
199
200
test_expect_success 'add LF before non-empty (1)' '
201
git show -s --pretty=format:"%s%+b%nThanks%n" HEAD^^ >actual &&
202
- test $(wc -l <actual) = 2
202
+ test_line_count = 2 actual
203
'
204
205
test_expect_success 'add LF before non-empty (2)' '
206
git show -s --pretty=format:"%s%+b%nThanks%n" HEAD >actual &&
207
- test $(wc -l <actual) = 6 &&
207
+ test_line_count = 6 actual &&
208
grep "^$" actual
209
'
210
@@ -278,8 +278,9 @@ test_expect_success 'oneline with empty message' '
278
git commit -m "dummy" --allow-empty &&
279
git filter-branch --msg-filter "sed -e s/dummy//" HEAD^^.. &&
280
git rev-list --oneline HEAD >test.txt &&
281
- test $(git rev-list --oneline HEAD | wc -l) -eq 5 &&
282
- test $(git rev-list --oneline --graph HEAD | wc -l) -eq 5
281
+ test_line_count = 5 test.txt &&
282
+ git rev-list --oneline --graph HEAD >testg.txt &&
283
+ test_line_count = 5 testg.txt
284
'
285
286
test_done
t/t6030-bisect-porcelain.sh
+1
-1
@@ -480,7 +480,7 @@ test_expect_success 'many merge bases creation' '
480
git merge -m "merge HASH7 and SIDE_HASH7" "$HASH7" &&
481
B_HASH=$(git rev-parse --verify HEAD) &&
482
git merge-base --all "$A_HASH" "$B_HASH" > merge_bases.txt &&
483
- test $(wc -l < merge_bases.txt) = "2" &&
483
+ test_line_count = 2 merge_bases.txt &&
484
grep "$HASH5" merge_bases.txt &&
485
grep "$SIDE_HASH5" merge_bases.txt
486
'
t/t6032-merge-large-rename.sh
+1
-1
@@ -97,7 +97,7 @@ test_expect_success 'setup large simple rename' '
97
test_expect_success 'massive simple rename does not spam added files' '
98
sane_unset GIT_MERGE_VERBOSITY &&
99
git merge --no-stat simple-rename | grep -v Removing >output &&
100
- test 5 -gt "$(wc -l < output)"
100
+ test_line_count -lt 5 output
101
'
102
103
test_done
t/t6042-merge-rename-corner-cases.sh
+1
-1
@@ -104,7 +104,7 @@ test_expect_failure 'conflict caused if rename not detected' '
104
test 0 -eq $(git ls-files -u | wc -l) &&
105
test 0 -eq $(git ls-files -o | wc -l) &&
106
107
- test 6 -eq $(wc -l < c) &&
107
+ test_line_count = 6 c &&
108
test $(git rev-parse HEAD:a) = $(git rev-parse B:a) &&
109
test $(git rev-parse HEAD:b) = $(git rev-parse A:b)
110
'
t/t7201-co.sh
+2
-2
@@ -229,7 +229,7 @@ test_expect_success 'checkout to detach HEAD (with advice declined)' '
229
git checkout -f renamer && git clean -f &&
230
git checkout renamer^ 2>messages &&
231
test_i18ngrep "HEAD is now at 7329388" messages &&
232
- test 1 -eq $(wc -l <messages) &&
232
+ test_line_count = 1 messages &&
233
H=$(git rev-parse --verify HEAD) &&
234
M=$(git show-ref -s --verify refs/heads/master) &&
235
test "z$H" = "z$M" &&
@@ -247,7 +247,7 @@ test_expect_success 'checkout to detach HEAD' '
247
git checkout -f renamer && git clean -f &&
248
git checkout renamer^ 2>messages &&
249
test_i18ngrep "HEAD is now at 7329388" messages &&
250
- test 1 -lt $(wc -l <messages) &&
250
+ test_line_count -gt 1 messages &&
251
H=$(git rev-parse --verify HEAD) &&
252
M=$(git show-ref -s --verify refs/heads/master) &&
253
test "z$H" = "z$M" &&
t/t7400-submodule-basic.sh
+1
-1
@@ -234,7 +234,7 @@ EOF
234
235
test_expect_success 'status should only print one line' '
236
git submodule status >lines &&
237
- test $(wc -l <lines) = 1
237
+ test_line_count = 1 lines
238
'
239
240
test_expect_success 'setup - fetch commit name from submodule' '
t/t7408-submodule-reference.sh
+2
-2
@@ -43,7 +43,7 @@ git commit -m B-super-added'
43
cd "$base_dir"
44
45
test_expect_success 'after add: existence of info/alternates' \
46
-'test `wc -l <super/.git/modules/sub/objects/info/alternates` = 1'
46
+'test_line_count = 1 super/.git/modules/sub/objects/info/alternates'
47
48
cd "$base_dir"
49
@@ -66,7 +66,7 @@ test_expect_success 'update with reference' \
66
cd "$base_dir"
67
68
test_expect_success 'after update: existence of info/alternates' \
69
-'test `wc -l <super-clone/.git/modules/sub/objects/info/alternates` = 1'
69
+'test_line_count = 1 super-clone/.git/modules/sub/objects/info/alternates'
70
71
cd "$base_dir"
72
t/t7502-commit.sh
+1
-1
@@ -335,7 +335,7 @@ test_expect_success 'A single-liner subject with a token plus colon is not a foo
335
git reset --hard &&
336
git commit -s -m "hello: kitty" --allow-empty &&
337
git cat-file commit HEAD | sed -e "1,/^$/d" >actual &&
338
- test $(wc -l <actual) = 3
338
+ test_line_count = 3 actual
339
340
'
341
t/t9350-fast-export.sh
+2
-2
@@ -86,7 +86,7 @@ test_expect_success 'import/export-marks' '
86
git checkout -b marks master &&
87
git fast-export --export-marks=tmp-marks HEAD &&
88
test -s tmp-marks &&
89
- test $(wc -l < tmp-marks) -eq 3 &&
89
+ test_line_count = 3 tmp-marks &&
90
test $(
91
git fast-export --import-marks=tmp-marks\
92
--export-marks=tmp-marks HEAD |
@@ -101,7 +101,7 @@ test_expect_success 'import/export-marks' '
101
grep ^commit\ |
102
wc -l) \
103
-eq 1 &&
104
- test $(wc -l < tmp-marks) -eq 4
104
+ test_line_count = 4 tmp-marks
105
106
'
107
t/t9400-git-cvsserver-server.sh
+2
-2
@@ -476,14 +476,14 @@ test_expect_success 'cvs status' '
476
cd cvswork &&
477
GIT_CONFIG="$git_config" cvs update &&
478
GIT_CONFIG="$git_config" cvs status | grep "^File: status.file" >../out &&
479
- test $(wc -l <../out) = 2
479
+ test_line_count = 2 ../out
480
'
481
482
cd "$WORKDIR"
483
test_expect_success 'cvs status (nonrecursive)' '
484
cd cvswork &&
485
GIT_CONFIG="$git_config" cvs status -l | grep "^File: status.file" >../out &&
486
- test $(wc -l <../out) = 1
486
+ test_line_count = 1 ../out
487
'
488
489
cd "$WORKDIR"