Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/cml/src/tests/test.sml
ViewVC logotype

Annotation of /sml/trunk/src/cml/src/tests/test.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (view) (download)

1 : monnier 7 structure Test =
2 :     struct
3 :    
4 :     val prog = "/bin/ls"
5 :    
6 :     fun doit () = let
7 :     val proc = Unix.execute(prog, [])
8 :     val (fin,fout) = Unix.streamsOf proc
9 :     fun echo () = (case TextIO.inputLine fin
10 :     of "" => ()
11 :     | s => (TextIO.output(TextIO.stdOut, s); echo())
12 :     (* end case *))
13 :     in
14 :     TextIO.closeOut fout;
15 :     echo ();
16 :     TextIO.closeIn fin;
17 :     ignore(Unix.reap proc);
18 :     ()
19 :     end
20 :    
21 :     fun run () = RunCML.doit(doit, SOME(Time.fromMilliseconds 100))
22 :    
23 :     end
24 :    

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0