20 lines
342 B
Plaintext
20 lines
342 B
Plaintext
|
#!/bin/bash
|
||
|
|
||
|
testEcho() {
|
||
|
assertEqual "$(echo foo)" "foo"
|
||
|
assertReturn "$(echo foo)" 0
|
||
|
}
|
||
|
|
||
|
testTest() {
|
||
|
assert "-e $0"
|
||
|
}
|
||
|
|
||
|
testArithmetic() {
|
||
|
assertGreaterThan "$(( 1 + 1 ))" "1"
|
||
|
assertAtLeast "$(( 1 + 1 ))" "2"
|
||
|
assertLessThan "$(( 1 + 1 ))" "5"
|
||
|
assertAtMost "$(( 1 + 1 ))" "2"
|
||
|
}
|
||
|
|
||
|
source $(dirname $0)/bashunit.bash
|