aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorE. Westbrook <github@westbrook.io>2018-06-04 23:23:39 -0600
committerE. Westbrook <github@westbrook.io>2018-06-05 00:00:39 -0600
commit8fee6363093611302af3af5139eba9716267f03b (patch)
treebeee9af67d33b0a073abe41b4efb49182f62404d /test
parent652959890943c34d7180cae372339b91e62f0d7b (diff)
downloadluasocket-8fee6363093611302af3af5139eba9716267f03b.tar.gz
luasocket-8fee6363093611302af3af5139eba9716267f03b.tar.bz2
luasocket-8fee6363093611302af3af5139eba9716267f03b.zip
Add ltn12.source.table()
Diffstat (limited to 'test')
-rw-r--r--test/ltn12test.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/ltn12test.lua b/test/ltn12test.lua
index e3f85fb..e7d368d 100644
--- a/test/ltn12test.lua
+++ b/test/ltn12test.lua
@@ -181,6 +181,15 @@ assert(table.concat(t) == s, "mismatch")
181print("ok") 181print("ok")
182 182
183-------------------------------- 183--------------------------------
184io.write("testing source.table: ")
185local inp = {'a','b','c','d','e'}
186local source = ltn12.source.table(inp)
187sink, t = ltn12.sink.table()
188assert(ltn12.pump.all(source, sink), "returned error")
189for i = 1, #inp do assert(t[i] == inp[i], "mismatch") end
190print("ok")
191
192--------------------------------
184io.write("testing source.chain (with split): ") 193io.write("testing source.chain (with split): ")
185source = ltn12.source.string(s) 194source = ltn12.source.string(s)
186filter = split(5) 195filter = split(5)