comparison src/tutorial.sml @ 1814:2d9f831d45c9

Update tutorial for Ur/Web changes
author Adam Chlipala <adam@chlipala.net>
date Mon, 03 Sep 2012 09:51:23 -0400
parents c414850f206f
children
comparison
equal deleted inserted replaced
1813:4c61bb7acb9b 1814:2d9f831d45c9
249 val proc = Unix.execute ("/bin/sh", ["-c", "/tmp/eval.exe /main"]) 249 val proc = Unix.execute ("/bin/sh", ["-c", "/tmp/eval.exe /main"])
250 val inf = Unix.textInstreamOf proc 250 val inf = Unix.textInstreamOf proc
251 val s = readAll inf 251 val s = readAll inf
252 val _ = Unix.reap proc 252 val _ = Unix.reap proc
253 253
254 val (befor, after) = Substring.position "<sc>" s 254 val (befor, after) = Substring.position "<body>" s
255 in 255 in
256 if Substring.isEmpty after then 256 if Substring.isEmpty after then
257 print ("Bad output for " ^ fname ^ "! [1]\n") 257 print ("Bad output for " ^ fname ^ "! [1]\n")
258 else 258 else
259 let 259 let
260 val after = Substring.slice (after, 4, NONE) 260 val after = Substring.slice (after, 6, NONE)
261 val (befor, after) = Substring.position "</body>" after 261 val (befor, after) = Substring.position "</body>" after
262 in 262 in
263 if Substring.isEmpty after then 263 if Substring.isEmpty after then
264 print ("Bad output for " ^ fname ^ "! [2]\n") 264 print ("Bad output for " ^ fname ^ "! [2]\n")
265 else 265 else