diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/filters/dump.lua | 17 | ||||
-rwxr-xr-x | tests/setup.sh | 19 | ||||
-rwxr-xr-x | tests/t0111-filter.sh | 3 |
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 @@ | |||
1 | function filter_open(...) | ||
2 | buffer = "" | ||
3 | for i = 1, select("#", ...) do | ||
4 | buffer = buffer .. select(i, ...) .. " " | ||
5 | end | ||
6 | end | ||
7 | |||
8 | function filter_close() | ||
9 | html(buffer) | ||
10 | return 0 | ||
11 | end | ||
12 | |||
13 | function filter_write(str) | ||
14 | buffer = buffer .. string.upper(str) | ||
15 | end | ||
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 | ||
61 | FILTER_DIRECTORY=$(cd ../filters && pwd) | 61 | FILTER_DIRECTORY=$(cd ../filters && pwd) |
62 | 62 | ||
63 | if cgit --version | grep -F -q "[+] Lua scripting"; then | ||
64 | export CGIT_HAS_LUA=1 | ||
65 | else | ||
66 | export CGIT_HAS_LUA=0 | ||
67 | fi | ||
68 | |||
69 | mkrepo() { | 63 | mkrepo() { |
70 | name=$1 | 64 | name=$1 |
71 | count=$2 | 65 | count=$2 |
@@ -144,19 +138,6 @@ repo.email-filter=exec:$FILTER_DIRECTORY/dump.sh | |||
144 | repo.source-filter=exec:$FILTER_DIRECTORY/dump.sh | 138 | repo.source-filter=exec:$FILTER_DIRECTORY/dump.sh |
145 | repo.readme=master:a+b | 139 | repo.readme=master:a+b |
146 | EOF | 140 | EOF |
147 | |||
148 | if [ $CGIT_HAS_LUA -eq 1 ]; then | ||
149 | cat >>cgitrc <<EOF | ||
150 | repo.url=filter-lua | ||
151 | repo.path=$PWD/repos/filter/.git | ||
152 | repo.desc=filtered repo | ||
153 | repo.about-filter=lua:$FILTER_DIRECTORY/dump.lua | ||
154 | repo.commit-filter=lua:$FILTER_DIRECTORY/dump.lua | ||
155 | repo.email-filter=lua:$FILTER_DIRECTORY/dump.lua | ||
156 | repo.source-filter=lua:$FILTER_DIRECTORY/dump.lua | ||
157 | repo.readme=master:a+b | ||
158 | EOF | ||
159 | fi | ||
160 | } | 141 | } |
161 | 142 | ||
162 | cgit_query() | 143 | cgit_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 | ||
6 | prefixes="exec" | 6 | prefixes="exec" |
7 | if [ $CGIT_HAS_LUA -eq 1 ]; then | ||
8 | prefixes="$prefixes lua" | ||
9 | fi | ||
10 | 7 | ||
11 | for prefix in $prefixes | 8 | for prefix in $prefixes |
12 | do | 9 | do |