mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-21 20:35:10 +00:00
Use portable [[:digit:]]
in version tests.
`\d` is not portable so use `[[:digit]]`.
This commit is contained in:
parent
e10d116510
commit
2db235f68b
@ -10,7 +10,7 @@ load test_helper
|
||||
@test "\`hosts version\` prints a version number." {
|
||||
run "${_HOSTS}" version
|
||||
printf "'%s'" "${output}"
|
||||
echo "${output}" | grep -q '\d\+\.\d\+\.\d\+'
|
||||
echo "${output}" | grep -q '[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+'
|
||||
}
|
||||
|
||||
@test "\`hosts --version\` returns with 0 status." {
|
||||
@ -21,7 +21,7 @@ load test_helper
|
||||
@test "\`hosts --version\` prints a version number." {
|
||||
run "${_HOSTS}" --version
|
||||
printf "'%s'" "${output}"
|
||||
echo "${output}" | grep -q '\d\+\.\d\+\.\d\+'
|
||||
echo "${output}" | grep -q '[[:digit:]]\+\.[[:digit:]]\+\.[[:digit:]]\+'
|
||||
}
|
||||
|
||||
# help ########################################################################
|
||||
|
Loading…
Reference in New Issue
Block a user