aboutsummaryrefslogtreecommitdiff
path: root/tests/testsuite.at
diff options
context:
space:
mode:
Diffstat (limited to 'tests/testsuite.at')
-rw-r--r--tests/testsuite.at38
1 files changed, 25 insertions, 13 deletions
diff --git a/tests/testsuite.at b/tests/testsuite.at
index a022697..7312433 100644
--- a/tests/testsuite.at
+++ b/tests/testsuite.at
@@ -18,20 +18,31 @@ m4_version_prereq([2.52g])
m4_define([AT_SKIP_TEST],[exit 77])
-m4_define([AT_VCL],[
- at_vcl_backend "m4_bpatsubst([$1],[[\"\$]],\\\&)" "m4_bpatsubst([$2],[[\"\$]],\\\&)" > test.vtc
- cat >> test.vtc <<EOT
-client c1 {
- $3
-}
-
-client c1 -run
-EOT
-])
-
-m4_define([AT_VARNISHTEST],
-[$VARNISHTEST test.vtc | sed 's/^#.*TEST test.vtc passed.*/OK/'])
+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])
@@ -44,5 +55,6 @@ m4_include([defined.at])
m4_include([type_of.at])
m4_include([undef.at])
m4_include([batchset.at])
+m4_include([gstring.at])
# End of testsuite.at

Return to:

Send suggestions and report system problems to the System administrator.