diff options
author | Lukas Fleischer <[email protected]> | 2014-01-15 23:11:19 +0100 |
---|---|---|
committer | Jason A. Donenfeld <[email protected]> | 2014-01-16 00:53:18 +0100 |
commit | 3741254a6989b2837cd8d20480f152f0096bcb9a (patch) | |
tree | 5997134d4aaff3ccade061c8cce6de85cbf3ed88 /tests/filters/dump.lua | |
parent | 2a7dd4bf67edeff2c6c4f6d6d39d2d7f954d978a (diff) |
t0111: Additions and fixes
* Rename the capitalize-* filters to dump.* since they also dump the
arguments.
* Add full argument validation to the email filters.
Signed-off-by: Lukas Fleischer <[email protected]>
Diffstat (limited to 'tests/filters/dump.lua')
-rw-r--r-- | tests/filters/dump.lua | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/filters/dump.lua b/tests/filters/dump.lua new file mode 100644 index 0000000..1f15c93 --- /dev/null +++ b/tests/filters/dump.lua @@ -0,0 +1,17 @@ +function filter_open(...) + buffer = "" + for i = 1, select("#", ...) do + buffer = buffer .. select(i, ...) .. " " + end +end + +function filter_close() + html(buffer) + return 0 +end + +function filter_write(str) + buffer = buffer .. string.upper(str) +end + + |