From 5427339c2a8b658d1b12d8493e9ef7a5592543b6 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 25 Apr 2022 21:38:02 -0500 Subject: [PATCH] Basic httpd smoketests. --- tests/httpd.test | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tests/httpd.test diff --git a/tests/httpd.test b/tests/httpd.test new file mode 100755 index 00000000..ac07c39e --- /dev/null +++ b/tests/httpd.test @@ -0,0 +1,15 @@ +#!/bin/bash + +[ -f testing.sh ] && . testing.sh + +#testing "name" "command" "result" "infile" "stdin" + +testcmd "static file" \ + "\"\$FILES\" | sed 's/\\r//g;1,/^\$/d'>file; cmp file \$FILES/tar/tar.tar && echo yes" \ + 'yes\n' '' 'GET /tar/tar.tar HTTP/1.1\r\n\r\n' +rm -f file + +testcmd "mime type" \ + '"$FILES" | tr A-Z a-z | sed -n "s/\r//g;s/^content-type: //p"' "application/x-tar\n" "" \ + 'GET /tar/tar.tar HTTP/1.1\r\n\r\n' + -- 2.39.2