summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuke Shumaker <LukeShu@sbcglobal.net>2013-06-08 13:08:29 -0600
committerLuke Shumaker <LukeShu@sbcglobal.net>2013-06-08 13:08:29 -0600
commit18b74bdc32406fbe4b79c5efc0f1814683ba2b9a (patch)
treece88cf8add0c9e5648016ee7a10fb2ee65980d5a /test
parent0d4d85ac0b1a2a1e2d5ed03d43f8b3b5d728ca3a (diff)
is_built: make the version optional
Diffstat (limited to 'test')
-rw-r--r--test/is_built-test.sh9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/is_built-test.sh b/test/is_built-test.sh
index bcd46f5..04b17cd 100644
--- a/test/is_built-test.sh
+++ b/test/is_built-test.sh
@@ -21,17 +21,16 @@ it_displays_help() {
it_fails_with_0_args() {
is_built >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
- [[ $stat > 1 ]]
+ [[ $stat -gt 1 ]]
[[ -z "$(cat $tmpdir/stdout)" ]]
[[ -n "$(cat $tmpdir/stderr)" ]]
}
-it_fails_with_1_arg() {
- is_built sh >$tmpdir/stdout 2>$tmpdir/stderr || stat=$?
+it_succeeds_with_1_arg() {
+ is_built sh >$tmpdir/stdout 2>$tmpdir/stderr
- [[ $stat > 1 ]]
[[ -z "$(cat $tmpdir/stdout)" ]]
- [[ -n "$(cat $tmpdir/stderr)" ]]
+ [[ -z "$(cat $tmpdir/stderr)" ]]
}
it_returns_1_for_non_existent_package() {