mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
more tests
This commit is contained in:
parent
45d49f5dcc
commit
17ad952e18
3 changed files with 119 additions and 0 deletions
26
examples/test_output_domains.txt.expected
Normal file
26
examples/test_output_domains.txt.expected
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
listening on http://localhost:8083/
|
||||
connect to 127.0.0.1:8083
|
||||
HTTP/1.1 200 OK
|
||||
content-type: text/event-stream
|
||||
|
||||
data: 0
|
||||
|
||||
data: 1
|
||||
|
||||
data: 2
|
||||
|
||||
data: 3
|
||||
|
||||
data: 4
|
||||
|
||||
data: 5
|
||||
|
||||
data: 6
|
||||
|
||||
data: 7
|
||||
|
||||
data: 8
|
||||
|
||||
data: 9
|
||||
|
||||
success
|
||||
70
tests/echo1_domains.expect
Normal file
70
tests/echo1_domains.expect
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
listening on http://127.0.0.1:8095
|
||||
echo:
|
||||
{meth=GET; host=localhost:8095;
|
||||
headers=[user-agent: test
|
||||
accept: */*
|
||||
host: localhost:8095];
|
||||
path="/echo/?a=b&c=d"; body=""; path_components=["echo"];
|
||||
query=["c","d";"a","b"]}
|
||||
(query: "c" = "d";"a" = "b")
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>
|
||||
list directory "Embedded_fs"
|
||||
</title>
|
||||
<meta charset="utf-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<h2>
|
||||
Index of ""
|
||||
</h2>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/vfs/a.txt">
|
||||
a.txt
|
||||
</a>
|
||||
(12b)
|
||||
</li>
|
||||
<li>
|
||||
<a href="/vfs/foo.html">
|
||||
foo.html
|
||||
</a>
|
||||
(214b)
|
||||
</li>
|
||||
<li>
|
||||
<a href="/vfs/sub">
|
||||
sub
|
||||
</a>
|
||||
[dir]
|
||||
|
||||
</li>
|
||||
<li>
|
||||
<a href="/vfs/test_out.txt">
|
||||
test_out.txt
|
||||
</a>
|
||||
(209b)
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
hello
|
||||
world
|
||||
|
||||
<html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<h2> funky: </h2>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<a href="../"> go up!! </a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="../foo.html"> up/foo </a>
|
||||
</li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
23
tests/sse_count_domains.expect
Normal file
23
tests/sse_count_domains.expect
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
listening on http://localhost:8096/
|
||||
data: 0
|
||||
|
||||
data: 1
|
||||
|
||||
data: 2
|
||||
|
||||
data: 3
|
||||
|
||||
data: 4
|
||||
|
||||
data: 5
|
||||
|
||||
data: 6
|
||||
|
||||
data: 7
|
||||
|
||||
data: 8
|
||||
|
||||
data: 9
|
||||
|
||||
data: 10
|
||||
|
||||
Loading…
Add table
Reference in a new issue