summaryrefslogtreecommitdiffabout
path: root/tests/testsuite.at
blob: d0cc846eac962b9140eb8d8bf8834e30cd46c36a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This file is part of vmod-variable		-*- autotest -*-
# Copyright (C) 2015 Sergey Poznyakoff
#
# Vmod-variable is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# Vmod-variable is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with vmod-variable.  If not, see <http://www.gnu.org/licenses/>.

m4_version_prereq([2.52g])

m4_define([AT_SKIP_TEST],[exit 77])

dnl AT_VARNISHTEST(VCL, CLT[, SRV])
m4_define([AT_VARNISHTEST],[
AT_CHECK([
cat > test.vtc <<EOT
server s1 {
m4_if($3,,[dnl
        rxreq
        txresp],[$3])
} -start

varnish v1 -vcl+backend {
	import std;
        import variable from "$abs_top_builddir/src/.libs/libvmod_variable.so";
$1
} -start

client c1 {
$2
} -run
EOT
$VARNISHTEST test.vtc | sed 's/^#.*TEST test.vtc passed.*/OK/'
],
[0],
[OK
])])

AT_INIT
m4_include([string.at])
m4_include([int.at])
m4_include([real.at])
m4_include([duration.at])
m4_include([complex.at])
m4_include([clear.at])
m4_include([defined.at])
m4_include([type_of.at])
m4_include([undef.at])
m4_include([regset.at])
m4_include([gstring.at])

# End of testsuite.at

Return to:

Send suggestions and report system problems to the System administrator.