From 3741254a6989b2837cd8d20480f152f0096bcb9a Mon Sep 17 00:00:00 2001 From: Lukas Fleischer Date: Wed, 15 Jan 2014 23:11:19 +0100 Subject: 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 --- tests/filters/capitalize-buffer.lua | 17 ----------------- tests/filters/capitalize-stdin.sh | 4 ---- tests/filters/dump.lua | 17 +++++++++++++++++ tests/filters/dump.sh | 4 ++++ 4 files changed, 21 insertions(+), 21 deletions(-) delete mode 100644 tests/filters/capitalize-buffer.lua delete mode 100755 tests/filters/capitalize-stdin.sh create mode 100644 tests/filters/dump.lua create mode 100755 tests/filters/dump.sh (limited to 'tests/filters') diff --git a/tests/filters/capitalize-buffer.lua b/tests/filters/capitalize-buffer.lua deleted file mode 100644 index 1f15c93..0000000 --- a/tests/filters/capitalize-buffer.lua +++ /dev/null @@ -1,17 +0,0 @@ -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 - - diff --git a/tests/filters/capitalize-stdin.sh b/tests/filters/capitalize-stdin.sh deleted file mode 100755 index da6f7a1..0000000 --- a/tests/filters/capitalize-stdin.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh - -[ "$#" -gt 0 ] && printf "%s " "$*" -tr '[:lower:]' '[:upper:]' 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 + + diff --git a/tests/filters/dump.sh b/tests/filters/dump.sh new file mode 100755 index 0000000..da6f7a1 --- /dev/null +++ b/tests/filters/dump.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +[ "$#" -gt 0 ] && printf "%s " "$*" +tr '[:lower:]' '[:upper:]' -- cgit 1.4.1-21-gabe81