CS144Lab/tests/webget_t.sh
2021-09-21 17:11:37 -07:00

11 lines
315 B
Bash
Executable File

#!/bin/bash
WEB_HASH=`./apps/webget cs144.keithw.org /nph-hasher/xyzzy | tee /dev/stderr | tail -n 1`
CORRECT_HASH="7SmXqWkrLKzVBCEalbSPqBcvs11Pw263K7x4Wv3JckI"
if [ "${WEB_HASH}" != "${CORRECT_HASH}" ]; then
echo ERROR: webget returned output that did not match the test\'s expectations
exit 1
fi
exit 0