PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tutorial/io/low_level_redirection_example.e

http://github.com/tybor/Liberty
Specman e | 33 lines | 28 code | 5 blank | 0 comment | 0 complexity | 154469db732b3b38fe6818fed62f3566 MD5 | raw file
 1class LOW_LEVEL_REDIRECTION_EXAMPLE
 2
 3insert
 4   STREAM_HANDLER
 5
 6create {}
 7   make
 8
 9feature {}
10   make
11      do
12         std_input.redirect_from("low_level_redirection_example.e")
13         check
14            std_input.redirection_succeeded
15         end
16         std_output.redirect_to("low_level_redirection_example.log")
17         check
18            std_output.redirection_succeeded
19         end
20         from
21            std_input.read_line
22         until
23            std_input.end_of_input
24         loop
25            std_output.put_line(std_input.last_string)
26            std_input.read_line
27         end
28
29         std_input.restore_default_input
30         std_output.restore_default_output
31      end
32
33end -- class LOW_LEVEL_REDIRECTION_EXAMPLE