From b5269f5b054bf307e701fb59881f2bb652904f61 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Sat, 11 Dec 2021 09:46:33 -0500 Subject: [PATCH] small test --- tests/echo1.expect | 9 +++++++++ tests/echo1.sh | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 tests/echo1.expect create mode 100755 tests/echo1.sh diff --git a/tests/echo1.expect b/tests/echo1.expect new file mode 100644 index 00000000..7579fba1 --- /dev/null +++ b/tests/echo1.expect @@ -0,0 +1,9 @@ +listening on http://127.0.0.1:8083 +echo: +{meth=GET; host=localhost:8083; + headers=[user-agent: test + accept: */* + host: localhost:8083]; + path="/echo/?a=b&c=d"; body=""; path_components=["echo"]; + query=["c","d";"a","b"]} +(query: "c" = "d";"a" = "b") diff --git a/tests/echo1.sh b/tests/echo1.sh new file mode 100755 index 00000000..e5a20500 --- /dev/null +++ b/tests/echo1.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env sh + +ECHO=$1 + +"$ECHO" -p 8083 & +sleep 0.1 +curl -N 'http://localhost:8083/echo/?a=b&c=d' -H user-agent:test +kill %1