diff options
author | June McEnroe <june@causal.agency> | 2020-12-27 18:45:04 -0500 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-12-27 18:45:04 -0500 |
commit | 85016e706cd00e527dba3fa83b2783dfb56a4ffa (patch) | |
tree | fc28a97fede3b74ae2cb2e778ffd4c0ae59c637b /tests/filters | |
download | src-85016e706cd00e527dba3fa83b2783dfb56a4ffa.tar.gz src-85016e706cd00e527dba3fa83b2783dfb56a4ffa.zip |
Squashed 'www/git.causal.agency/cgit/' content from commit 02221fd3
git-subtree-dir: www/git.causal.agency/cgit git-subtree-split: 02221fd3fe523a3293d64e3359036e3a71d6fd7e
Diffstat (limited to 'tests/filters')
-rw-r--r-- | tests/filters/dump.lua | 17 | ||||
-rwxr-xr-x | tests/filters/dump.sh | 4 |
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/filters/dump.lua b/tests/filters/dump.lua new file mode 100644 index 00000000..1f15c931 --- /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 00000000..da6f7a1b --- /dev/null +++ b/tests/filters/dump.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +[ "$#" -gt 0 ] && printf "%s " "$*" +tr '[:lower:]' '[:upper:]' |