mirror of https://github.com/octoleo/hosts.git
Add version.bats.
This commit is contained in:
parent
6783e94f16
commit
7c961e1318
|
@ -0,0 +1,25 @@
|
|||
#!/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\+'
|
||||
}
|
Loading…
Reference in New Issue