aboutsummaryrefslogtreecommitdiff
path: root/tests/time01.vtc
blob: 2325f4ce7a9c32777e0d2e6119351cac5363570e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
varnishtest "Test strftime"

server s1 {
       rxreq
       txresp
} -start

varnish v1 -vcl+backend {
	import tbf from "${vmod_topbuild}/src/.libs/libvmod_tbf.so";
	sub vcl_deliver {
		set resp.http.result = tbf.strftime("%Y-%m-%d", tbf.systime());
	}
} -start

client c1 {
	txreq
	rxresp
	expect resp.http.result == 2013
}

client c1 -run


Return to:

Send suggestions and report system problems to the System administrator.