summaryrefslogtreecommitdiffabout
path: root/tests/cs.at
blob: 03339433d5f963e0e6dc8329ef915566b8b8b791 (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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
AT_SETUP([case-sensitive])
AT_KEYWORDS([case-sensitive])
AT_VARNISHTEST([dict],[
	sub vcl_init {
		dict.collisions(0);
		dict.load("\${vmod_topsrc}/tests/num.dict");
	}
	sub vcl_recv {
		set req.http.X-result = dict.lookup(regsub(req.url, "^/(.*)", "\1"));
             	return (hash);
	}
	sub vcl_deliver {
		set resp.http.X-result = req.http.X-result;
	}
],
[	txreq -url "/one"
	rxresp
	expect resp.http.X-result == "en"
	txreq -url "/two"
	rxresp
	expect resp.http.X-result == "to"
	txreq -url "/three"
	rxresp
	expect resp.http.X-result == "tre"
	txreq -url "/four"
	rxresp
	expect resp.http.X-result == "fire"
	txreq -url "/five"
	rxresp
	expect resp.http.X-result == "fem"
	txreq -url "/six"
	rxresp
	expect resp.http.X-result == "seks"
	txreq -url "/seven"
	rxresp
	expect resp.http.X-result == "sju"
	txreq -url "/eight"
	rxresp
	expect resp.http.X-result == "aatte"
	txreq -url "/nine"
	rxresp
	expect resp.http.X-result == "ni"
	txreq -url "/ten"
	rxresp
	expect resp.http.X-result == "ti"
	txreq -url "/eleven"
	rxresp
	expect resp.http.X-result == "elleve"
	txreq -url "/twelve"
	rxresp
	expect resp.http.X-result == "tolv"
],
[      rxreq
       txresp
       rxreq
       txresp
       rxreq
       txresp
       rxreq
       txresp
       rxreq
       txresp
       rxreq
       txresp
       rxreq
       txresp
       rxreq
       txresp
       rxreq
       txresp
       rxreq
       txresp
       rxreq
       txresp
       rxreq
       txresp
])
AT_CLEANUP

Return to:

Send suggestions and report system problems to the System administrator.