]> rtime.felk.cvut.cz Git - omk.git/commitdiff
test: Use bash's conditional expression
authorMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 11 Mar 2011 20:19:52 +0000 (21:19 +0100)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Fri, 11 Mar 2011 20:20:15 +0000 (21:20 +0100)
In OMK we use bash in all test script so we can use [[ ]] instead of
external command [ ].

tests/wvtest.sh

index 222a96689edc71831fba40b8393a06784ae63b9a..42889978bb0bdc2461c172fd56e6f08126715548 100644 (file)
@@ -165,7 +165,7 @@ esac
 
 echo "Testing \"$OMK_RULES rules\" in $(basename $0):" >&2
 testdir="tmp/$(basename $0 .sh).$OMK_RULES"
-[ -d "$testdir" ] && WVPASS rm -rf "$testdir"
+[[ -d "$testdir" ]] && WVPASS rm -rf "$testdir"
 WVPASS mkdir -p "$testdir"
 WVPASS cd "$testdir"
 WVPASS cp "$OMK_TESTSROOT"/../rules/$OMK_RULES/* .