diff options
Diffstat (limited to 'testes/files.lua')
-rw-r--r-- | testes/files.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testes/files.lua b/testes/files.lua index a11c5e61..e68eb9b8 100644 --- a/testes/files.lua +++ b/testes/files.lua | |||
@@ -125,7 +125,7 @@ do | |||
125 | -- closing file by scope | 125 | -- closing file by scope |
126 | local F = nil | 126 | local F = nil |
127 | do | 127 | do |
128 | local scoped f = assert(io.open(file, "w")) | 128 | local *toclose f = assert(io.open(file, "w")) |
129 | F = f | 129 | F = f |
130 | end | 130 | end |
131 | assert(tostring(F) == "file (closed)") | 131 | assert(tostring(F) == "file (closed)") |
@@ -135,7 +135,7 @@ assert(os.remove(file)) | |||
135 | 135 | ||
136 | do | 136 | do |
137 | -- test writing/reading numbers | 137 | -- test writing/reading numbers |
138 | local scoped f = assert(io.open(file, "w")) | 138 | local *toclose f = assert(io.open(file, "w")) |
139 | f:write(maxint, '\n') | 139 | f:write(maxint, '\n') |
140 | f:write(string.format("0X%x\n", maxint)) | 140 | f:write(string.format("0X%x\n", maxint)) |
141 | f:write("0xABCp-3", '\n') | 141 | f:write("0xABCp-3", '\n') |
@@ -158,7 +158,7 @@ assert(os.remove(file)) | |||
158 | 158 | ||
159 | -- testing multiple arguments to io.read | 159 | -- testing multiple arguments to io.read |
160 | do | 160 | do |
161 | local scoped f = assert(io.open(file, "w")) | 161 | local *toclose f = assert(io.open(file, "w")) |
162 | f:write[[ | 162 | f:write[[ |
163 | a line | 163 | a line |
164 | another line | 164 | another line |