diff options
Diffstat (limited to 'testes/files.lua')
-rw-r--r-- | testes/files.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testes/files.lua b/testes/files.lua index be00bf3f..1476006e 100644 --- a/testes/files.lua +++ b/testes/files.lua | |||
@@ -92,8 +92,8 @@ assert(io.output():seek("end") == string.len("alo joao")) | |||
92 | 92 | ||
93 | assert(io.output():seek("set") == 0) | 93 | assert(io.output():seek("set") == 0) |
94 | 94 | ||
95 | assert(io.write('"�lo"', "{a}\n", "second line\n", "third line \n")) | 95 | assert(io.write('"alo"', "{a}\n", "second line\n", "third line \n")) |
96 | assert(io.write('�fourth_line')) | 96 | assert(io.write('Xfourth_line')) |
97 | io.output(io.stdout) | 97 | io.output(io.stdout) |
98 | collectgarbage() -- file should be closed by GC | 98 | collectgarbage() -- file should be closed by GC |
99 | assert(io.input() == io.stdin and rawequal(io.output(), io.stdout)) | 99 | assert(io.input() == io.stdin and rawequal(io.output(), io.stdout)) |
@@ -300,14 +300,14 @@ do -- test error returns | |||
300 | end | 300 | end |
301 | checkerr("invalid format", io.read, "x") | 301 | checkerr("invalid format", io.read, "x") |
302 | assert(io.read(0) == "") -- not eof | 302 | assert(io.read(0) == "") -- not eof |
303 | assert(io.read(5, 'l') == '"�lo"') | 303 | assert(io.read(5, 'l') == '"alo"') |
304 | assert(io.read(0) == "") | 304 | assert(io.read(0) == "") |
305 | assert(io.read() == "second line") | 305 | assert(io.read() == "second line") |
306 | local x = io.input():seek() | 306 | local x = io.input():seek() |
307 | assert(io.read() == "third line ") | 307 | assert(io.read() == "third line ") |
308 | assert(io.input():seek("set", x)) | 308 | assert(io.input():seek("set", x)) |
309 | assert(io.read('L') == "third line \n") | 309 | assert(io.read('L') == "third line \n") |
310 | assert(io.read(1) == "�") | 310 | assert(io.read(1) == "X") |
311 | assert(io.read(string.len"fourth_line") == "fourth_line") | 311 | assert(io.read(string.len"fourth_line") == "fourth_line") |
312 | assert(io.input():seek("cur", -string.len"fourth_line")) | 312 | assert(io.input():seek("cur", -string.len"fourth_line")) |
313 | assert(io.read() == "fourth_line") | 313 | assert(io.read() == "fourth_line") |