t0111: Add basic tests for Lua filters

* Validate the email filter by manipulating stdin. Additional checks for
  all the arguments can be added in a later patch.

* Add the exec prefix to all informational messages.

* Rename the filter repository to filter-exec. The Git repository itself
  is not renamed since it can be shared amongst all filter types.

* In the filter checks, check whether all arguments are passed properly
  instead of validating the buffer/stdin only.

Signed-off-by: Lukas Fleischer <cgit@cryptocrack.de>
Tá an tiomantas seo le fáil i:
Lukas Fleischer
2014-01-14 22:25:45 +01:00
tiomanta ag Jason A. Donenfeld
tuismitheoir 8ae1d8b8fd
tiomantas caf557a2ba
D'athraigh 5 comhad le 56 breiseanna agus 29 scriosta

Féach ar an gComhad

@ -1,3 +0,0 @@
#!/bin/sh
echo "$1" | tr '[:lower:]' '[:upper:]'

Féach ar an gComhad

@ -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

Féach ar an gComhad

@ -1,3 +1,4 @@
#!/bin/sh
[ "$#" -gt 0 ] && printf "%s " "$*"
tr '[:lower:]' '[:upper:]'