summaryrefslogtreecommitdiff
path: root/tests/modules/io/test.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2019-08-19 23:56:37 +0800
committerruki <[email protected]>2019-08-19 17:39:42 +0800
commit9bb52f37ef2c92b1f69023f183616323516ce1fc (patch)
treecf210b7ff7c73b39231c1d2c20b512189d17411d /tests/modules/io/test.lua
parent905b289ecf007df7d30bcdcee927e46931639ea8 (diff)
fix test
Diffstat (limited to 'tests/modules/io/test.lua')
-rw-r--r--tests/modules/io/test.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/modules/io/test.lua b/tests/modules/io/test.lua
index cb893b490..e4c6f23e1 100644
--- a/tests/modules/io/test.lua
+++ b/tests/modules/io/test.lua
@@ -41,7 +41,7 @@ function test_readlines(t)
function get_all_without_crlf(file, opt)
local r = {}
local fp = io.open(file, "r", opt)
- for l in fp:lines() do
+ for l in fp:lines(opt) do
table.insert(r, l)
end
t:require(fp:close())
@@ -58,7 +58,7 @@ function test_readlines(t)
t:are_equal(get_all_without_crlf("files/utf8bom-lf-eleof"), {"123\\", "456", "789"})
t:are_equal(get_all_without_crlf("files/utf8-crlf-neleof"), {"123\\", "456", "789"})
t:are_equal(get_all_without_crlf("files/utf8-crlf-neleof", {encoding = "binary"}), {"123\\\r\n", "456\r\n", "789"})
- t:are_equal(get_all_without_crlf("files/utf8-crlf-neleof", {continuation = "\\"}), {"123\\", "456", "789"})
+ t:are_equal(get_all_without_crlf("files/utf8-crlf-neleof", {continuation = "\\"}), {"123456", "789"})
t:are_equal(get_all_without_crlf("files/utf16be-lf-eleof"), {"123\\", "456", "789"})
t:are_equal(get_all_without_crlf("files/utf16le-crlf-neleof"), {"123\\", "456", "789"})
end