small test

This commit is contained in:
Simon Cruanes 2021-12-11 09:46:33 -05:00
parent dc72dad5db
commit b5269f5b05
No known key found for this signature in database
GPG key ID: 4AC01D0849AA62B6
2 changed files with 17 additions and 0 deletions

9
tests/echo1.expect Normal file
View file

@ -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")

8
tests/echo1.sh Executable file
View file

@ -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