/tutorial/exec/cat.e
Specman e | 31 lines | 27 code | 4 blank | 0 comment | 0 complexity | 7bd6780ae25d8b883c6378a27162204c MD5 | raw file
1class CAT 2 3create {ANY} 4 make 5 6feature {} 7 make 8 local 9 pf: PROCESS_FACTORY; p: PROCESS 10 do 11 p := pf.execute("cat", Void) 12 from 13 std_input.read_line 14 until 15 std_input.end_of_input 16 loop 17 p.input.put_string(std_input.last_string) 18 p.input.put_new_line 19 p.output.read_line 20 std_output.put_string(p.output.last_string) 21 std_output.put_new_line 22 std_input.read_line 23 end 24 25 p.input.disconnect 26 p.wait 27 std_output.put_integer(p.status) 28 std_output.put_new_line 29 end 30 31end -- class CAT