Blame tests/p_coreutils/wc.sh

Alice Kaerast a5b9f7
#!/bin/bash
Alice Kaerast a5b9f7
# Author: Alice Kaerast <alice@kaerast.info>
Alice Kaerast a5b9f7
Alice Kaerast a5b9f7
t_Log "$0 - test wc output"
Alice Kaerast a5b9f7
Alice Kaerast a5b9f7
cat << EOF > /var/tmp/wc-test
Alice Kaerast a5b9f7
1 2
Alice Kaerast a5b9f7
3 4
Alice Kaerast a5b9f7
5 6
Alice Kaerast a5b9f7
EOF
Alice Kaerast a5b9f7
Alice Kaerast a5b9f7
# file should have 3 lines, 12 bytes, 12 characters, max line length of 3, and 6 words
Alice Kaerast a5b9f7
wc -l /var/tmp/wc-test | grep -q 3 && wc -c /var/tmp/wc-test | grep -q 12 && wc -m /var/tmp/wc-test | grep -q 12 && wc -L /var/tmp/wc-test | grep -q 3 && wc -w /var/tmp/wc-test | grep -q 6
Alice Kaerast a5b9f7
Alice Kaerast a5b9f7
t_CheckExitStatus $?
Alice Kaerast a5b9f7
Alice Kaerast a5b9f7
# Cleanup
Alice Kaerast a5b9f7
rm /var/tmp/wc-test