Blame


1 5c2e310e 2021-01-22 op #!/bin/sh
2 5c2e310e 2021-01-22 op
3 5c2e310e 2021-01-22 op set -e
4 5c2e310e 2021-01-22 op
5 02be96c6 2021-02-09 op ggflags=
6 02be96c6 2021-02-09 op
7 fb4102a5 2021-07-06 op config_common='
8 fb4102a5 2021-07-06 op ipv6 off
9 fb4102a5 2021-07-06 op port 10965
10 fb4102a5 2021-07-06 op '
11 fb4102a5 2021-07-06 op
12 5c2e310e 2021-01-22 op # usage: config <global config> <stuff for localhost>
13 5c2e310e 2021-01-22 op # generates a configuration file reg.conf
14 5c2e310e 2021-01-22 op config() {
15 5c2e310e 2021-01-22 op cat <<EOF > reg.conf
16 fb4102a5 2021-07-06 op $config_common
17 5c2e310e 2021-01-22 op $1
18 5c2e310e 2021-01-22 op server "localhost" {
19 6ff23c67 2021-02-01 op cert "$PWD/cert.pem"
20 6ff23c67 2021-02-01 op key "$PWD/key.pem"
21 6ff23c67 2021-02-01 op root "$PWD/testdata"
22 5c2e310e 2021-01-22 op $2
23 5c2e310e 2021-01-22 op }
24 5c2e310e 2021-01-22 op EOF
25 5c2e310e 2021-01-22 op }
26 5c2e310e 2021-01-22 op
27 5c2e310e 2021-01-22 op checkconf() {
28 5c2e310e 2021-01-22 op ./../gmid -n -c reg.conf
29 5c2e310e 2021-01-22 op }
30 5c2e310e 2021-01-22 op
31 5c2e310e 2021-01-22 op # usage: get <path>
32 5c2e310e 2021-01-22 op # return the body of the request on stdout
33 5c2e310e 2021-01-22 op get() {
34 321341f6 2021-07-06 op ./gg -T30 -b $ggflags "gemini://localhost:10965/$1"
35 5c2e310e 2021-01-22 op }
36 5c2e310e 2021-01-22 op
37 5c2e310e 2021-01-22 op # usage: head <path>
38 5c2e310e 2021-01-22 op # return the meta response line on stdout
39 5c2e310e 2021-01-22 op head() {
40 321341f6 2021-07-06 op ./gg -T30 -h $ggflags "gemini://localhost:10965/$1"
41 5c2e310e 2021-01-22 op }
42 5c2e310e 2021-01-22 op
43 31a4993a 2021-01-23 op # usage: raw <path>
44 31a4993a 2021-01-23 op # return both header and body
45 31a4993a 2021-01-23 op raw() {
46 321341f6 2021-07-06 op ./gg -T30 $ggflags "gemini://localhost:10965/$1"
47 31a4993a 2021-01-23 op }
48 31a4993a 2021-01-23 op
49 5c2e310e 2021-01-22 op run() {
50 ca3f6756 2021-07-06 op ./../gmid -f -c reg.conf &
51 5c2e310e 2021-01-22 op pid=$!
52 31a4993a 2021-01-23 op # give gmid time to bind the port, otherwise we end up
53 31a4993a 2021-01-23 op # executing gg when gmid isn't ready yet.
54 31a4993a 2021-01-23 op sleep 1
55 5c2e310e 2021-01-22 op }
56 5c2e310e 2021-01-22 op
57 5c2e310e 2021-01-22 op # usage: check [exit-message]
58 5c2e310e 2021-01-22 op # check if gmid is still running
59 5c2e310e 2021-01-22 op check() {
60 5c2e310e 2021-01-22 op if ! ps $pid >/dev/null; then
61 5c2e310e 2021-01-22 op echo ${1:-"gmid crashed?"}
62 5c2e310e 2021-01-22 op exit 1
63 5c2e310e 2021-01-22 op fi
64 5c2e310e 2021-01-22 op }
65 5c2e310e 2021-01-22 op
66 afc025ff 2021-02-06 op restart() {
67 052c9d24 2021-03-20 op kill -HUP $pid
68 afc025ff 2021-02-06 op sleep 1
69 afc025ff 2021-02-06 op }
70 afc025ff 2021-02-06 op
71 5c2e310e 2021-01-22 op # quit gmid
72 5c2e310e 2021-01-22 op quit() {
73 052c9d24 2021-03-20 op kill $pid || true
74 5c2e310e 2021-01-22 op wait || true
75 5c2e310e 2021-01-22 op }
76 5c2e310e 2021-01-22 op
77 9f006a21 2021-02-07 op count() {
78 9f006a21 2021-02-07 op wc -l | xargs
79 9f006a21 2021-02-07 op }
80 9f006a21 2021-02-07 op
81 5c2e310e 2021-01-22 op # usage: eq a b errmsg
82 5c2e310e 2021-01-22 op # if a and b aren't equal strings, exit with errmsg
83 5c2e310e 2021-01-22 op eq() {
84 5c2e310e 2021-01-22 op if ! [ "$1" = "$2" ]; then
85 5c2e310e 2021-01-22 op echo "$3: \"$1\" not equal \"$2\""
86 5c2e310e 2021-01-22 op exit 1
87 5c2e310e 2021-01-22 op fi
88 5c2e310e 2021-01-22 op }
89 5c2e310e 2021-01-22 op
90 5c2e310e 2021-01-22 op onexit() {
91 5c2e310e 2021-01-22 op rm -f bigfile bigfile.sha
92 5c2e310e 2021-01-22 op quit
93 5c2e310e 2021-01-22 op }
94 5c2e310e 2021-01-22 op
95 5c2e310e 2021-01-22 op # tests
96 5c2e310e 2021-01-22 op
97 5c2e310e 2021-01-22 op trap 'onexit' INT TERM EXIT
98 5c2e310e 2021-01-22 op
99 5c2e310e 2021-01-22 op endl=`printf "\r\n"`
100 5c2e310e 2021-01-22 op lf=`echo`
101 5c2e310e 2021-01-22 op
102 5c2e310e 2021-01-22 op config "" ""
103 5c2e310e 2021-01-22 op checkconf
104 5c2e310e 2021-01-22 op run
105 5c2e310e 2021-01-22 op
106 5c2e310e 2021-01-22 op eq "$(head /)" "20 text/gemini" "Unexpected head for /"
107 5c2e310e 2021-01-22 op eq "$(get /)" "# hello world$ln" "Unexpected body for /"
108 5c2e310e 2021-01-22 op echo OK GET /
109 5c2e310e 2021-01-22 op
110 5c2e310e 2021-01-22 op eq "$(head /foo)" "51 not found" "Unexpected head /foo"
111 5c2e310e 2021-01-22 op eq "$(get /foo)" "" "Unexpected body /foo"
112 5c2e310e 2021-01-22 op echo OK GET /foo
113 5c2e310e 2021-01-22 op
114 5c2e310e 2021-01-22 op # should redirect if asked for a directory but without the trailing /
115 5c2e310e 2021-01-22 op eq "$(head /dir)" "30 /dir/" "Unexpected redirect for /dir"
116 5c2e310e 2021-01-22 op eq "$(get /dir)" "" "Unexpected body for redirect"
117 5c2e310e 2021-01-22 op echo OK GET /dir
118 5c2e310e 2021-01-22 op
119 5c2e310e 2021-01-22 op # 51 for a directory without index.gmi
120 5c2e310e 2021-01-22 op eq "$(head /dir/)" "51 not found" "Unexpected head for /"
121 5c2e310e 2021-01-22 op eq "$(get /dir/)" "" "Unexpected body for error"
122 5c2e310e 2021-01-22 op echo OK GET /dir/
123 5c2e310e 2021-01-22 op
124 5c2e310e 2021-01-22 op eq "$(head /dir/foo.gmi)" "20 text/gemini" "Unexpected head for /dir/foo.gmi"
125 5c2e310e 2021-01-22 op eq "$(get /dir/foo.gmi)" "# hello world$ln" "Unexpected body for /dir/foo.gmi"
126 5c2e310e 2021-01-22 op echo OK GET /dir/foo.gmi
127 5c2e310e 2021-01-22 op
128 5c2e310e 2021-01-22 op # try a big file
129 5c2e310e 2021-01-22 op eq "$(head /bigfile)" "20 application/octet-stream" "Unexpected head for /bigfile"
130 5c2e310e 2021-01-22 op get /bigfile > bigfile
131 5c2e310e 2021-01-22 op ./sha bigfile bigfile.sha
132 5c2e310e 2021-01-22 op eq "$(cat bigfile.sha)" "$(cat testdata/bigfile.sha)" "Unexpected sha for /bigfile"
133 5c2e310e 2021-01-22 op echo OK GET /bigfile
134 5c2e310e 2021-01-22 op
135 5c2e310e 2021-01-22 op # shouldn't be executing cgi scripts
136 5c2e310e 2021-01-22 op eq "$(head /hello)" "20 application/octet-stream" "Unexpected head for /hello"
137 5c2e310e 2021-01-22 op echo OK GET /hello
138 5c2e310e 2021-01-22 op
139 5c2e310e 2021-01-22 op check "should be running"
140 5c2e310e 2021-01-22 op
141 5c2e310e 2021-01-22 op # try with custom mime
142 5c2e310e 2021-01-22 op config 'mime "text/x-funny-text" "gmi"' 'default type "application/x-trash"'
143 5c2e310e 2021-01-22 op checkconf
144 afc025ff 2021-02-06 op restart
145 5c2e310e 2021-01-22 op
146 5c2e310e 2021-01-22 op eq "$(head /)" "20 text/x-funny-text" "Unexpected head for /"
147 5c2e310e 2021-01-22 op echo OK GET / with custom mime
148 5c2e310e 2021-01-22 op
149 5c2e310e 2021-01-22 op eq "$(head /hello)" "20 application/x-trash" "Unexpected head for /hello"
150 5c2e310e 2021-01-22 op echo OK GET /hello with custom mime
151 5c2e310e 2021-01-22 op
152 5c2e310e 2021-01-22 op check "should be running"
153 5c2e310e 2021-01-22 op
154 5c2e310e 2021-01-22 op # try with custom lang
155 5c2e310e 2021-01-22 op config '' 'lang "it"'
156 5c2e310e 2021-01-22 op checkconf
157 afc025ff 2021-02-06 op restart
158 5c2e310e 2021-01-22 op
159 5c2e310e 2021-01-22 op eq "$(head /)" "20 text/gemini; lang=it" "Unexpected head for /"
160 5c2e310e 2021-01-22 op echo OK GET / with custom lang
161 5c2e310e 2021-01-22 op
162 5c2e310e 2021-01-22 op check "should be running"
163 5c2e310e 2021-01-22 op
164 49b73ba1 2021-02-10 op # make sure we can use different lang in different location rules
165 49b73ba1 2021-02-10 op config '' 'lang "it" location "/en/*" { lang "en" } location "/de/*" { lang "de" }'
166 49b73ba1 2021-02-10 op checkconf
167 a4188b78 2021-02-12 op echo OK parse multiple locations correctly
168 49b73ba1 2021-02-10 op restart
169 49b73ba1 2021-02-10 op
170 9f006a21 2021-02-07 op # try with CGI scripts
171 87f2b68b 2021-02-02 op config '' 'cgi "*"'
172 5c2e310e 2021-01-22 op checkconf
173 afc025ff 2021-02-06 op restart
174 5c2e310e 2021-01-22 op
175 5c2e310e 2021-01-22 op eq "$(head /hello)" "20 text/gemini" "Unexpected head for /hello"
176 5c2e310e 2021-01-22 op eq "$(get /hello)" "# hello world$ln" "Unexpected body for /hello"
177 5c2e310e 2021-01-22 op echo OK GET /hello with cgi
178 5c2e310e 2021-01-22 op
179 5c2e310e 2021-01-22 op eq "$(head /slow)" "20 text/gemini" "Unexpected head for /slow"
180 5c2e310e 2021-01-22 op eq "$(get /slow)" "# hello world$ln" "Unexpected body for /slow"
181 5c2e310e 2021-01-22 op echo OK GET /slow with cgi
182 5c2e310e 2021-01-22 op
183 35744950 2021-02-01 op eq "$(head /err)" "42 CGI error" "Unexpected head for /err"
184 5c2e310e 2021-01-22 op eq "$(get /err)" "" "Unexpected body for /err"
185 5c2e310e 2021-01-22 op echo OK GET /err with cgi
186 5c2e310e 2021-01-22 op
187 6cdecad8 2021-01-23 op eq "$(raw /invalid | wc -c | xargs)" 2048 "Unexpected body for /invalid"
188 3309ef97 2021-01-23 op echo OK GET /invalid with cgi
189 3309ef97 2021-01-23 op
190 c836cdfa 2021-03-29 op eq "$(raw /max-length-reply | wc -c | xargs)" 1029 "Unexpected header for /max-length-reply"
191 c836cdfa 2021-03-29 op echo OK GET /max-length-reply with cgi
192 c836cdfa 2021-03-29 op
193 7b31a638 2021-01-24 op # try a big file
194 7b31a638 2021-01-24 op eq "$(head /serve-bigfile)" "20 application/octet-stream" "Unexpected head for /serve-bigfile"
195 7b31a638 2021-01-24 op get /bigfile > bigfile
196 7b31a638 2021-01-24 op ./sha bigfile bigfile.sha
197 7b31a638 2021-01-24 op eq "$(cat bigfile.sha)" "$(cat testdata/bigfile.sha)" "Unexpected sha for /serve-bigfile"
198 7b31a638 2021-01-24 op echo OK GET /serve-bigfile with cgi
199 7b31a638 2021-01-24 op
200 9f006a21 2021-02-07 op # ensure we split the query correctly
201 9f006a21 2021-02-07 op eq "$(get /env | awk /^-/ | count)" 1 "Unexpected number of arguments"
202 9f006a21 2021-02-07 op eq "$(get /env?foo | awk /^-/ | count)" 2 "Unexpected number of arguments"
203 9f006a21 2021-02-07 op eq "$(get /env?foo+bar | awk /^-/ | count)" 3 "Unexpected number of arguments"
204 9f006a21 2021-02-07 op eq "$(get /env?foo+bar=5 | awk /^-/ | count)" 1 "Unexpected number of arguments"
205 9f006a21 2021-02-07 op eq "$(get /env?foo+bar%3d5 | awk /^-/ | count)" 3 "Unexpected number of arguments"
206 9f006a21 2021-02-07 op
207 5c2e310e 2021-01-22 op check "should be running"
208 e7a2a99b 2021-01-24 op
209 e7a2a99b 2021-01-24 op config '' 'index "foo.gmi"'
210 e7a2a99b 2021-01-24 op checkconf
211 afc025ff 2021-02-06 op restart
212 e7a2a99b 2021-01-24 op
213 e7a2a99b 2021-01-24 op eq "$(head /dir/)" "20 text/gemini" "Unexpected head for /"
214 e7a2a99b 2021-01-24 op eq "$(get /dir/)" "# hello world$ln" "Unexpected body for error"
215 e7a2a99b 2021-01-24 op echo OK GET /dir/ with custom index
216 e7a2a99b 2021-01-24 op
217 e7a2a99b 2021-01-24 op check "should be running"
218 c8b74339 2021-01-24 op
219 49b73ba1 2021-02-10 op config '' 'location "/dir/*" { default type "text/plain" index "hello" }'
220 c8b74339 2021-01-24 op checkconf
221 afc025ff 2021-02-06 op restart
222 c8b74339 2021-01-24 op
223 c8b74339 2021-01-24 op eq "$(head /dir/hello)" "20 text/plain" "Unexpected head for /"
224 c8b74339 2021-01-24 op echo OK GET /dir/hello with location and default type
225 c8b74339 2021-01-24 op
226 252908e6 2021-01-24 op eq "$(head /dir/)" "20 text/plain" "Unexpected head for /dir/"
227 c8b74339 2021-01-24 op eq "$(get /dir/|tail -1)" 'echo "# hello world"' "Unexpected body for /dir/"
228 c8b74339 2021-01-24 op echo OK GET /dir/ with location and custom index
229 c8b74339 2021-01-24 op
230 c8b74339 2021-01-24 op check "should be running"
231 252908e6 2021-01-24 op
232 49b73ba1 2021-02-10 op config '' 'location "/dir/*" { auto index on }'
233 252908e6 2021-01-24 op checkconf
234 afc025ff 2021-02-06 op restart
235 252908e6 2021-01-24 op
236 252908e6 2021-01-24 op eq "$(head /)" "20 text/gemini" "Unexpected head for /"
237 252908e6 2021-01-24 op eq "$(get /)" "# hello world$ln" "Unexpected body for /"
238 252908e6 2021-01-24 op echo OK GET / with auto index
239 252908e6 2021-01-24 op
240 252908e6 2021-01-24 op eq "$(head /dir)" "30 /dir/" "Unexpected head for /dir"
241 252908e6 2021-01-24 op eq "$(head /dir/)" "20 text/gemini" "Unexpected head for /dir/"
242 5f715ce4 2021-02-02 op eq "$(get /dir/|wc -l|xargs)" "5" "Unexpected body for /dir/"
243 252908e6 2021-01-24 op echo OK GET /dir/ with auto index on
244 252908e6 2021-01-24 op
245 252908e6 2021-01-24 op check "should be running"
246 6abda252 2021-02-06 op
247 6abda252 2021-02-06 op # test block return and strip
248 6abda252 2021-02-06 op
249 6abda252 2021-02-06 op config '' 'location "*" { block }'
250 6abda252 2021-02-06 op checkconf
251 afc025ff 2021-02-06 op restart
252 6abda252 2021-02-06 op
253 6abda252 2021-02-06 op eq "$(head /)" "40 temporary failure" "Unexpected head for /"
254 6abda252 2021-02-06 op eq "$(get /)" "" "Unexpected body for /"
255 6abda252 2021-02-06 op echo OK GET / with block
256 6abda252 2021-02-06 op
257 6abda252 2021-02-06 op eq "$(head /nonexists)" "40 temporary failure" "Unexpected head for /nonexists"
258 6abda252 2021-02-06 op eq "$(get /nonexists)" "" "Unexpected body for /nonexists"
259 6abda252 2021-02-06 op echo OK GET /nonexists with block
260 6abda252 2021-02-06 op
261 6abda252 2021-02-06 op check "should be running"
262 6abda252 2021-02-06 op
263 6abda252 2021-02-06 op config '' '
264 6abda252 2021-02-06 op location "/dir" {
265 6abda252 2021-02-06 op strip 1
266 6abda252 2021-02-06 op block return 40 "%% %p %q %P %N test"
267 6abda252 2021-02-06 op }
268 6abda252 2021-02-06 op location "*" {
269 6abda252 2021-02-06 op strip 99
270 6abda252 2021-02-06 op block return 40 "%% %p %q %P %N test"
271 6abda252 2021-02-06 op }'
272 6abda252 2021-02-06 op checkconf
273 afc025ff 2021-02-06 op restart
274 6abda252 2021-02-06 op
275 6abda252 2021-02-06 op eq "$(head /dir/foo.gmi)" "40 % /foo.gmi 10965 localhost test"
276 6abda252 2021-02-06 op echo OK GET /dir/foo.gmi with strip and block
277 6abda252 2021-02-06 op
278 737a6b50 2021-04-30 op eq "$(head /bigfile)" "40 % / 10965 localhost test"
279 6abda252 2021-02-06 op echo OK GET /bigfile with strip and block
280 6abda252 2021-02-06 op
281 6abda252 2021-02-06 op check "should be running"
282 e3ddf390 2021-02-06 op
283 e3ddf390 2021-02-06 op # test the entrypoint
284 e3ddf390 2021-02-06 op
285 e3ddf390 2021-02-06 op config '' 'entrypoint "/env"'
286 e3ddf390 2021-02-06 op checkconf
287 e3ddf390 2021-02-06 op restart
288 afc025ff 2021-02-06 op
289 e3ddf390 2021-02-06 op eq "$(head /foo/bar)" "20 text/plain; lang=en" "Unknown head for /foo/bar"
290 e3ddf390 2021-02-06 op eq "$(get /foo/bar|grep PATH_INFO)" "PATH_INFO=/foo/bar" "Unexpected PATH_INFO"
291 e3ddf390 2021-02-06 op echo OK GET /foo/bar with entrypoint
292 e3ddf390 2021-02-06 op
293 02be96c6 2021-02-09 op # test with require ca
294 02be96c6 2021-02-09 op
295 02be96c6 2021-02-09 op config '' 'require client ca "'$PWD'/testca.pem"'
296 02be96c6 2021-02-09 op checkconf
297 02be96c6 2021-02-09 op restart
298 02be96c6 2021-02-09 op
299 02be96c6 2021-02-09 op eq "$(head /)" "60 client certificate required" "Unexpected head for /"
300 02be96c6 2021-02-09 op echo OK GET / without client certificate
301 02be96c6 2021-02-09 op
302 02be96c6 2021-02-09 op ggflags="-C valid.crt -K valid.key"
303 02be96c6 2021-02-09 op eq "$(head /)" "20 text/gemini" "Unexpected head for /"
304 02be96c6 2021-02-09 op echo OK GET / with valid client certificate
305 02be96c6 2021-02-09 op
306 02be96c6 2021-02-09 op ggflags="-C invalid.cert.pem -K invalid.key.pem"
307 02be96c6 2021-02-09 op eq "$(head /)" "61 certificate not authorised" "Unexpected head for /"
308 02be96c6 2021-02-09 op echo OK GET / with invalid client certificate
309 02be96c6 2021-02-09 op
310 02be96c6 2021-02-09 op ggflags=''
311 fdea6aa0 2021-04-30 op
312 fdea6aa0 2021-04-30 op
313 fdea6aa0 2021-04-30 op # test with root inside a location
314 fdea6aa0 2021-04-30 op
315 fdea6aa0 2021-04-30 op config '' 'location "/foo/*" { root "'$PWD'/testdata" strip 1 }'
316 fdea6aa0 2021-04-30 op checkconf
317 fdea6aa0 2021-04-30 op restart
318 fdea6aa0 2021-04-30 op
319 7aa92586 2021-04-30 op eq "$(head /foo)" "51 not found" "Unexpected head for /foo"
320 7aa92586 2021-04-30 op eq "$(head /foo/)" "20 text/gemini" "Unexpected head for /foo/"
321 0f2124e2 2021-06-12 op echo OK /foo and /foo/ with root inside location
322 7aa92586 2021-04-30 op
323 7aa92586 2021-04-30 op # how to match both /foo and /foo/*
324 7aa92586 2021-04-30 op config '' '
325 7aa92586 2021-04-30 op location "/foo" { block return 31 "%p/" }
326 7aa92586 2021-04-30 op location "/foo/*" { root "'$PWD'/testdata" strip 1 }
327 7aa92586 2021-04-30 op '
328 7aa92586 2021-04-30 op checkconf
329 7aa92586 2021-04-30 op restart
330 fdea6aa0 2021-04-30 op
331 7aa92586 2021-04-30 op eq "$(head /foo)" "31 /foo/" "Unexpected head for /foo"
332 fdea6aa0 2021-04-30 op eq "$(head /foo/)" "20 text/gemini" "Unexpected head for /foo/"
333 0f2124e2 2021-06-12 op echo OK /foo and /foo/ with root inside location
334 0f2124e2 2021-06-12 op
335 0f2124e2 2021-06-12 op # test with fastcgi
336 0f2124e2 2021-06-12 op
337 0f2124e2 2021-06-12 op # NB: the fcgi spawn is NOT supported outside of this test suite
338 0f2124e2 2021-06-12 op
339 0f2124e2 2021-06-12 op config 'prefork 1' 'fastcgi spawn "'$PWD'/fcgi-test"'
340 0f2124e2 2021-06-12 op checkconf
341 0f2124e2 2021-06-12 op restart
342 0f2124e2 2021-06-12 op
343 0f2124e2 2021-06-12 op eq "$(head /)" "20 text/gemini" "Unexpected head for /"
344 0f2124e2 2021-06-12 op eq "$(get /)" "# Hello, world!" "Unexpected body for /"
345 0f2124e2 2021-06-12 op echo OK GET / with fastcgi
346 fb4102a5 2021-07-06 op
347 fb4102a5 2021-07-06 op # test macro expansion
348 fb4102a5 2021-07-06 op
349 fb4102a5 2021-07-06 op cat <<EOF > reg.conf
350 fb4102a5 2021-07-06 op pwd = "$PWD"
351 fb4102a5 2021-07-06 op $config_common
352 fb4102a5 2021-07-06 op
353 fb4102a5 2021-07-06 op server "localhost" {
354 fb4102a5 2021-07-06 op # the quoting of \$ is for sh
355 fb4102a5 2021-07-06 op cert \$pwd "/cert.pem"
356 fb4102a5 2021-07-06 op key \$pwd "/key.pem"
357 fb4102a5 2021-07-06 op root \$pwd "/testdata"
358 fb4102a5 2021-07-06 op }
359 fb4102a5 2021-07-06 op EOF
360 fb4102a5 2021-07-06 op checkconf
361 fb4102a5 2021-07-06 op restart
362 fb4102a5 2021-07-06 op
363 fb4102a5 2021-07-06 op eq "$(head /)" "20 text/gemini" "Unexpected head for /"
364 fb4102a5 2021-07-06 op eq "$(get /)" "# hello world$ln" "Unexpected body for /"
365 fb4102a5 2021-07-06 op echo OK GET / with macro expansion