mirror of
https://github.com/octoleo/hosts.git
synced 2025-01-01 05:31:49 +00:00
Add version.bats.
This commit is contained in:
parent
6783e94f16
commit
7c961e1318
25
test/version.bats
Normal file
25
test/version.bats
Normal file
@ -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
Block a user