Use portable `[[:digit:]]` in version tests.

`\d` is not portable so use `[[:digit]]`.
This commit is contained in:
William Melody 2019-11-21 19:26:49 -08:00
parent e10d116510
commit 2db235f68b
1 changed files with 2 additions and 2 deletions

View File

@ -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 ########################################################################