Add more verbose output and apply fixes suggested by shellcheck.

This commit is contained in:
Andrew Wood
2023-07-23 18:45:53 +01:00
parent 82aa30c306
commit 6a24d75022
4 changed files with 43 additions and 14 deletions
+11 -2
View File
@@ -2,11 +2,20 @@
#
# Check that the update interval can be set.
# Dummy assignments for "shellcheck".
testSubject="${testSubject:-false}"; workFile1="${workFile1:-.tmp1}"
sleep 1 | "${testSubject}" -f -i 0.1 >/dev/null 2>"${workFile1}"
# There should be more than 6 lines of output.
#
NUM=$(tr '\r' '\n' < "${workFile1}" | wc -l | tr -d ' ')
test $NUM -gt 6
lineCount=$(tr '\r' '\n' < "${workFile1}" | wc -l | tr -dc '0-9')
if ! test "${lineCount}" -gt 6; then
echo "fewer than 7 lines of output"
tr '\r' '\n' < "${workFile1}"
exit 1
fi
exit 0
# EOF