/[eiffelstudio]/trunk/eweasel/tests/lib035/test.e
ViewVC logotype

Contents of /trunk/eweasel/tests/lib035/test.e

Parent Directory Parent Directory | Revision Log Revision Log


Revision 89758 - (show annotations)
Tue Oct 30 15:26:20 2012 UTC (7 years, 2 months ago) by manus
File size: 585 byte(s)
Use `make_with_name' from FILE to not get the obsolete warning when using `make'.
Use `rename_file' instead of `change_name' which is also now obsolete.

1
2 class TEST
3 inherit
4 PLAIN_TEXT_FILE
5 rename
6 make as file_make
7 end
8
9 create
10 make
11
12 feature {NONE} -- Initialization
13
14 make
15 local
16 tried, started, done: BOOLEAN
17 do
18 if not tried then
19 make_with_name ("test.txt")
20 open_write
21 close
22 mode := Write_file
23 -- `file_pointer' now invalid
24 started := True
25 print (position); io.new_line
26 done := True
27 mode := Closed_file
28 else
29 print ("Bad file pointer detected"); io.new_line
30 end
31 rescue
32 if started and not done then
33 mode := Closed_file
34 tried := True
35 retry
36 end
37 end
38
39 end

Properties

Name Value
svn:eol-style native
svn:keywords Author Date ID Revision

  ViewVC Help
Powered by ViewVC 1.1.23