3 # sha256 of "20 text/gemini\r\n# hello world\n"
4 ok_res=6989d9b0e082c79edb8f625ebb77ddcb07764d3dd0c7c5ae60a27a50a33f6a15
6 # sha256 of docs/script
7 script_res=00bf8349336a4a1896f9e98dda67c8264f70b767343351247db96b4546f8d872
13 # check "path" "expected-sha256"
15 got=`get "$1" | $sha | awk '{print \$1}'`
16 if [ "$got" '!=' "$2" ]; then
17 echo "FAIL $1 (with_cgi: $with_cgi)"
29 # check for sha256sum (linux) or sha256 (OpenBSD)
30 if which sha256sum >/dev/null; then
32 elif which sha256 >/dev/null; then
35 echo "No sha256/sha256sum binary available"
40 ./../gmid -c no-cgi.conf 2>/dev/null &
43 check "/index.gmi" $ok_res
44 check "/script" $script_res
47 echo "Is gmid still running?"
54 ./../gmid -c cgi.conf 2>/dev/null &
57 check "/index.gmi" $ok_res
58 check "/script" $ok_res