diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ltn12test.lua | 9 |
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") | |||
181 | print("ok") | 181 | print("ok") |
182 | 182 | ||
183 | -------------------------------- | 183 | -------------------------------- |
184 | io.write("testing source.table: ") | ||
185 | local inp = {'a','b','c','d','e'} | ||
186 | local source = ltn12.source.table(inp) | ||
187 | sink, t = ltn12.sink.table() | ||
188 | assert(ltn12.pump.all(source, sink), "returned error") | ||
189 | for i = 1, #inp do assert(t[i] == inp[i], "mismatch") end | ||
190 | print("ok") | ||
191 | |||
192 | -------------------------------- | ||
184 | io.write("testing source.chain (with split): ") | 193 | io.write("testing source.chain (with split): ") |
185 | source = ltn12.source.string(s) | 194 | source = ltn12.source.string(s) |
186 | filter = split(5) | 195 | filter = split(5) |