aboutsummaryrefslogtreecommitdiff
path: root/tests/time00.vtc
blob: 2b7925b35c4d6d93f9a69e3515baca8e4e39b2d9 (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", 26697600);
	}
} -start

client c1 {
	txreq
	rxresp
	expect resp.http.result == 1970-11-06
}

client c1 -run


Return to:

Send suggestions and report system problems to the System administrator.