1
0
mirror of https://github.com/octoleo/hosts.git synced 2024-06-07 08:50:50 +00:00

Use version command for tests that expect it in version.bats.

This commit is contained in:
William Melody 2016-01-26 19:07:28 -08:00
parent 4265bfe1f9
commit 0bd1c32cd1

View File

@ -3,12 +3,12 @@
load test_helper load test_helper
@test "\`hosts version\` returns with 0 status." { @test "\`hosts version\` returns with 0 status." {
run "$_HOSTS" --version run "$_HOSTS" version
[[ "$status" -eq 0 ]] [[ "$status" -eq 0 ]]
} }
@test "\`hosts version\` prints a version number." { @test "\`hosts version\` prints a version number." {
run "$_HOSTS" --version run "$_HOSTS" version
printf "'%s'" "$output" printf "'%s'" "$output"
echo "$output" | grep -q '\d\+\.\d\+\.\d\+' echo "$output" | grep -q '\d\+\.\d\+\.\d\+'
} }