Add ltn12.source.table()
This commit is contained in:
parent
6529598909
commit
8fee636309
4 changed files with 31 additions and 1 deletions
|
@ -180,6 +180,15 @@ assert(ltn12.pump.all(source, sink), "returned error")
|
|||
assert(table.concat(t) == s, "mismatch")
|
||||
print("ok")
|
||||
|
||||
--------------------------------
|
||||
io.write("testing source.table: ")
|
||||
local inp = {'a','b','c','d','e'}
|
||||
local source = ltn12.source.table(inp)
|
||||
sink, t = ltn12.sink.table()
|
||||
assert(ltn12.pump.all(source, sink), "returned error")
|
||||
for i = 1, #inp do assert(t[i] == inp[i], "mismatch") end
|
||||
print("ok")
|
||||
|
||||
--------------------------------
|
||||
io.write("testing source.chain (with split): ")
|
||||
source = ltn12.source.string(s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue