NAME=read from http
FILE=--
CMDS=<<EOF
!python3 scripts/http_server.py
o http://127.0.0.1:9000/simple.html
r
(phtml blocksize; echo --- ${blocksize} ---; b ${blocksize}; ps; echo ---\n)
.(phtml 128)
.(phtml 256)
.(phtml 512)
!python3 scripts/kill_http_server.py
EOF
EXPECT=<<EOF
342
--- 128 ---
<!DOCTYPE html>
<html>
<head>
<title>My Simple Web Page</title>
<style>
body {
background-color: lightgrey;
}
h1 {
color: blue;

---

--- 256 ---
<!DOCTYPE html>
<html>
<head>
<title>My Simple Web Page</title>
<style>
body {
background-color: lightgrey;
}
h1 {
color: blue;
}
p {
font-family: Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to My Page!</h1>
<p>This is a simple web page create
---

--- 512 ---
<!DOCTYPE html>
<html>
<head>
<title>My Simple Web Page</title>
<style>
body {
background-color: lightgrey;
}
h1 {
color: blue;
}
p {
font-family: Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Welcome to My Page!</h1>
<p>This is a simple web page created using HTML.</p>
<a href="https://www.example.com">Visit Example</a>
</body>
</html>
\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff
---

Killed http.server
EOF
RUN
