@@ -40,7 +40,7 @@ test_expect_success \
4040rm -f path* .merge_* out .git/index &&
4141git read-tree $t1 &&
4242git checkout-index --temp -- path1 >out &&
43- test $(wc -l <out) = 1 &&
43+ test_line_count = 1 out &&
4444test $(cut "-d " -f2 out) = path1 &&
4545p=$(cut "-d " -f1 out) &&
4646test -f $p &&
@@ -51,7 +51,7 @@ test_expect_success \
5151rm -f path* .merge_* out .git/index &&
5252git read-tree $t1 &&
5353git checkout-index -a --temp >out &&
54- test $(wc -l <out) = 5 &&
54+ test_line_count = 5 out &&
5555for f in path0 path1 path3 path4 asubdir/path5
5656do
5757 test $(grep $f out | cut "-d " -f2) = $f &&
@@ -69,7 +69,7 @@ test_expect_success \
6969' checkout one stage 2 to temporary file' '
7070rm -f path* .merge_* out &&
7171git checkout-index --stage=2 --temp -- path1 >out &&
72- test $(wc -l <out) = 1 &&
72+ test_line_count = 1 out &&
7373test $(cut "-d " -f2 out) = path1 &&
7474p=$(cut "-d " -f1 out) &&
7575test -f $p &&
@@ -79,7 +79,7 @@ test_expect_success \
7979' checkout all stage 2 to temporary files' '
8080rm -f path* .merge_* out &&
8181git checkout-index --all --stage=2 --temp >out &&
82- test $(wc -l <out) = 3 &&
82+ test_line_count = 3 out &&
8383for f in path1 path2 path4
8484do
8585 test $(grep $f out | cut "-d " -f2) = $f &&
@@ -92,13 +92,13 @@ test_expect_success \
9292' checkout all stages/one file to nothing' '
9393rm -f path* .merge_* out &&
9494git checkout-index --stage=all --temp -- path0 >out &&
95- test $(wc -l <out) = 0'
95+ test_line_count = 0 out '
9696
9797test_expect_success \
9898' checkout all stages/one file to temporary files' '
9999rm -f path* .merge_* out &&
100100git checkout-index --stage=all --temp -- path1 >out &&
101- test $(wc -l <out) = 1 &&
101+ test_line_count = 1 out &&
102102test $(cut "-d " -f2 out) = path1 &&
103103cut "-d " -f1 out | (read s1 s2 s3 &&
104104test -f $s1 &&
@@ -112,7 +112,7 @@ test_expect_success \
112112' checkout some stages/one file to temporary files' '
113113rm -f path* .merge_* out &&
114114git checkout-index --stage=all --temp -- path2 >out &&
115- test $(wc -l <out) = 1 &&
115+ test_line_count = 1 out &&
116116test $(cut "-d " -f2 out) = path2 &&
117117cut "-d " -f1 out | (read s1 s2 s3 &&
118118test $s1 = . &&
@@ -125,7 +125,7 @@ test_expect_success \
125125' checkout all stages/all files to temporary files' '
126126rm -f path* .merge_* out &&
127127git checkout-index -a --stage=all --temp >out &&
128- test $(wc -l <out) = 5'
128+ test_line_count = 5 out '
129129
130130test_expect_success \
131131' -- path0: no entry' '
@@ -185,7 +185,7 @@ test_expect_success \
185185' checkout --temp within subdir' '
186186(cd asubdir &&
187187 git checkout-index -a --stage=all >out &&
188- test $(wc -l <out) = 1 &&
188+ test_line_count = 1 out &&
189189 test $(grep path5 out | cut "-d " -f2) = path5 &&
190190 grep path5 out | cut "-d " -f1 | (read s1 s2 s3 &&
191191 test -f ../$s1 &&
@@ -203,7 +203,7 @@ t4=$(git write-tree) &&
203203rm -f .git/index &&
204204git read-tree $t4 &&
205205git checkout-index --temp -a >out &&
206- test $(wc -l <out) = 1 &&
206+ test_line_count = 1 out &&
207207test $(cut "-d " -f2 out) = a &&
208208p=$(cut "-d " -f1 out) &&
209209test -f $p &&
0 commit comments