Skip to content

Commit 5008ba8

Browse files
avargitster
authored andcommitted
wildmatch test: use more standard shell style
Change the wildmatch test to use more standard shell style, usually we use "if test" not "if [". Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a4a136f commit 5008ba8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

t/t3070-wildmatch.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ test_description='wildmatch tests'
55
. ./test-lib.sh
66

77
match() {
8-
if [ $1 = 1 ]; then
8+
if test "$1" = 1
9+
then
910
test_expect_success "wildmatch: match '$3' '$4'" "
1011
test-wildmatch wildmatch '$3' '$4'
1112
"
@@ -17,7 +18,8 @@ match() {
1718
}
1819

1920
imatch() {
20-
if [ $1 = 1 ]; then
21+
if test "$1" = 1
22+
then
2123
test_expect_success "iwildmatch: match '$2' '$3'" "
2224
test-wildmatch iwildmatch '$2' '$3'
2325
"
@@ -29,7 +31,8 @@ imatch() {
2931
}
3032

3133
pathmatch() {
32-
if [ $1 = 1 ]; then
34+
if test "$1" = 1
35+
then
3336
test_expect_success "pathmatch: match '$2' '$3'" "
3437
test-wildmatch pathmatch '$2' '$3'
3538
"

0 commit comments

Comments
 (0)