16 lines
467 B
Bash
Executable File
16 lines
467 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Check that the byte counter counts in bits when --bits is selected.
|
|
|
|
true "${testSubject:?not set - call this from 'make check'}"
|
|
true "${workFile1:?not set - call this from 'make check'}"
|
|
|
|
dd if=/dev/zero bs=100 count=1 2>/dev/null \
|
|
| "${testSubject}" -f -b -8 >/dev/null 2>"${workFile1}"
|
|
|
|
counterValue=$(tr '\r' '\n' < "${workFile1}" | tr -d ' ')
|
|
test "${counterValue}" = "800b" && exit 0
|
|
|
|
echo "unexpected bit counter value: ${counterValue}"
|
|
exit 1
|