27 lines
490 B
Bash
27 lines
490 B
Bash
setup(){
|
|
export PATH="${PWD}/build:${PATH}"
|
|
load 'test_helper/bats-support/load'
|
|
load 'test_helper/bats-assert/load'
|
|
}
|
|
|
|
@test "command found" {
|
|
run command -v args
|
|
assert_output --partial args
|
|
}
|
|
|
|
@test "no args? you fail." {
|
|
run args
|
|
assert_output --partial "args obviously needs arguments to work…"
|
|
assert_failure
|
|
}
|
|
|
|
@test "one arg" {
|
|
run args one
|
|
assert_output --partial "@1"$'\t'"one"
|
|
}
|
|
|
|
@test "represent empty string" {
|
|
run args ''
|
|
assert_output --partial "@1"$'\t'"''"
|
|
}
|