about summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/filters/dump.lua17
-rwxr-xr-xtests/setup.sh19
-rwxr-xr-xtests/t0111-filter.sh3
3 files changed, 0 insertions, 39 deletions
diff --git a/tests/filters/dump.lua b/tests/filters/dump.lua deleted file mode 100644 index 1f15c93..0000000 --- a/tests/filters/dump.lua +++ /dev/null
@@ -1,17 +0,0 @@
1function filter_open(...)
2 buffer = ""
3 for i = 1, select("#", ...) do
4 buffer = buffer .. select(i, ...) .. " "
5 end
6end
7
8function filter_close()
9 html(buffer)
10 return 0
11end
12
13function filter_write(str)
14 buffer = buffer .. string.upper(str)
15end
16
17
diff --git a/tests/setup.sh b/tests/setup.sh index 8db810f..31e7d5b 100755 --- a/tests/setup.sh +++ b/tests/setup.sh
@@ -60,12 +60,6 @@ fi
60 60
61FILTER_DIRECTORY=$(cd ../filters && pwd) 61FILTER_DIRECTORY=$(cd ../filters && pwd)
62 62
63if cgit --version | grep -F -q "[+] Lua scripting"; then
64 export CGIT_HAS_LUA=1
65else
66 export CGIT_HAS_LUA=0
67fi
68
69mkrepo() { 63mkrepo() {
70 name=$1 64 name=$1
71 count=$2 65 count=$2
@@ -144,19 +138,6 @@ repo.email-filter=exec:$FILTER_DIRECTORY/dump.sh
144repo.source-filter=exec:$FILTER_DIRECTORY/dump.sh 138repo.source-filter=exec:$FILTER_DIRECTORY/dump.sh
145repo.readme=master:a+b 139repo.readme=master:a+b
146EOF 140EOF
147
148 if [ $CGIT_HAS_LUA -eq 1 ]; then
149 cat >>cgitrc <<EOF
150repo.url=filter-lua
151repo.path=$PWD/repos/filter/.git
152repo.desc=filtered repo
153repo.about-filter=lua:$FILTER_DIRECTORY/dump.lua
154repo.commit-filter=lua:$FILTER_DIRECTORY/dump.lua
155repo.email-filter=lua:$FILTER_DIRECTORY/dump.lua
156repo.source-filter=lua:$FILTER_DIRECTORY/dump.lua
157repo.readme=master:a+b
158EOF
159 fi
160} 141}
161 142
162cgit_query() 143cgit_query()
diff --git a/tests/t0111-filter.sh b/tests/t0111-filter.sh index 2fdc366..e5d3575 100755 --- a/tests/t0111-filter.sh +++ b/tests/t0111-filter.sh
@@ -4,9 +4,6 @@ test_description='Check filtered content'
4. ./setup.sh 4. ./setup.sh
5 5
6prefixes="exec" 6prefixes="exec"
7if [ $CGIT_HAS_LUA -eq 1 ]; then
8 prefixes="$prefixes lua"
9fi
10 7
11for prefix in $prefixes 8for prefix in $prefixes
12do 9do