diff options
Diffstat (limited to 'tests/008-numeric')
-rw-r--r-- | tests/008-numeric | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/008-numeric b/tests/008-numeric new file mode 100644 index 0000000..baa44f2 --- /dev/null +++ b/tests/008-numeric @@ -0,0 +1,18 @@ +#!/bin/sh +# +# Check that numeric output outputs some percentages. + +# Process 100 bytes at 100 bytes per second, updating every 0.1 seconds for +# around 10 output lines. +# +dd if=/dev/zero bs=100 count=1 2>/dev/null \ +| $PROG -s 100 -n -i 0.1 -L 100 >/dev/null 2>$TMP1 + +# The number of output lines should be >8 and <13, and the final percentage +# should be 100. +# +test `wc -l < $TMP1` -gt 8 +test `wc -l < $TMP1` -lt 13 +test `sed -n '$p' < $TMP1` -eq 100 + +# EOF |