Files
pv/tests/Modifiers_-_--interval.test
T

20 lines
484 B
Bash
Executable File

#!/bin/sh
#
# Check that the update interval can be set.
true "${testSubject:?not set - call this from 'make check'}"
true "${workFile1:?not set - call this from 'make check'}"
sleep 1 | "${testSubject}" -f -i 0.1 >/dev/null 2>"${workFile1}"
# There should be more than 6 lines of output.
#
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