From 8fee6363093611302af3af5139eba9716267f03b Mon Sep 17 00:00:00 2001 From: "E. Westbrook" Date: Mon, 4 Jun 2018 23:23:39 -0600 Subject: Add ltn12.source.table() --- test/ltn12test.lua | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test') diff --git a/test/ltn12test.lua b/test/ltn12test.lua index e3f85fb..e7d368d 100644 --- a/test/ltn12test.lua +++ b/test/ltn12test.lua @@ -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) -- cgit v1.2.3-55-g6feb