mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-25 06:07:40 +00:00
26 lines
558 B
Plaintext
26 lines
558 B
Plaintext
|
#!/usr/bin/env bats
|
||
|
|
||
|
load test_helper
|
||
|
|
||
|
@test "\`hosts version\` returns with 0 status." {
|
||
|
run "$_HOSTS" --version
|
||
|
[[ "$status" -eq 0 ]]
|
||
|
}
|
||
|
|
||
|
@test "\`hosts version\` prints a version number." {
|
||
|
run "$_HOSTS" --version
|
||
|
printf "'%s'" "$output"
|
||
|
echo "$output" | grep -q '\d\+\.\d\+\.\d\+'
|
||
|
}
|
||
|
|
||
|
@test "\`hosts --version\` returns with 0 status." {
|
||
|
run "$_HOSTS" --version
|
||
|
[[ "$status" -eq 0 ]]
|
||
|
}
|
||
|
|
||
|
@test "\`hosts --version\` prints a version number." {
|
||
|
run "$_HOSTS" --version
|
||
|
printf "'%s'" "$output"
|
||
|
echo "$output" | grep -q '\d\+\.\d\+\.\d\+'
|
||
|
}
|