t/t0025-crlf-auto.sh: avoid "test <cond> -a/-o <cond>"
The construct is error-prone; "test" being built-in in most modern shells, the reason to avoid "test <cond> && test <cond>" spawning one extra process by using a single "test <cond> -a <cond>" no longer exists. Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Reviewed-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elia Pinto committed
Jun 6, 2014 at 07:55 UTC
fbaff7a26225e4e3b9088aae83c9febcd8bb6825
1 file changed
+3
-3
t/t0025-crlf-auto.sh
+3
-3
@@ -36,7 +36,7 @@ test_expect_success 'default settings cause no changes' '
36
onediff=$(git diff one) &&
37
twodiff=$(git diff two) &&
38
threediff=$(git diff three) &&
39
- test -z "$onediff" -a -z "$twodiff" -a -z "$threediff"
39
+ test -z "$onediff" && test -z "$twodiff" && test -z "$threediff"
40
'
41
42
test_expect_success 'crlf=true causes a CRLF file to be normalized' '
@@ -111,7 +111,7 @@ test_expect_success 'autocrlf=true does not normalize CRLF files' '
111
onediff=$(git diff one) &&
112
twodiff=$(git diff two) &&
113
threediff=$(git diff three) &&
114
- test -z "$onediff" -a -z "$twodiff" -a -z "$threediff"
114
+ test -z "$onediff" && test -z "$twodiff" && test -z "$threediff"
115
'
116
117
test_expect_success 'text=auto, autocrlf=true _does_ normalize CRLF files' '
@@ -126,7 +126,7 @@ test_expect_success 'text=auto, autocrlf=true _does_ normalize CRLF files' '
126
onediff=$(git diff one) &&
127
twodiff=$(git diff two) &&
128
threediff=$(git diff three) &&
129
- test -z "$onediff" -a -n "$twodiff" -a -z "$threediff"
129
+ test -z "$onediff" && test -n "$twodiff" && test -z "$threediff"
130
'
131
132
test_expect_success 'text=auto, autocrlf=true does not normalize binary files' '