~ubuntu-branches/ubuntu/lucid/varnish/lucid-updates

« back to all changes in this revision

Viewing changes to bin/varnishtest/tests/b00028.vtc

  • Committer: Bazaar Package Importer
  • Author(s): Stig Sandbeck Mathisen
  • Date: 2010-03-24 13:26:08 UTC
  • mfrom: (0.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20100324132608-4uzkavctn26bdwyi
Tags: 2.1.0-1
* New upstream version
* Fix small error in man/vcl.7so

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id$
 
1
# $Id: b00028.vtc 4554 2010-02-12 11:25:46Z phk $
2
2
 
3
3
test "regexp match and no-match"
4
4
 
10
10
varnish v1 -vcl+backend {
11
11
 
12
12
        sub vcl_fetch {
13
 
                if (obj.http.foo ~ "bar") {
14
 
                        set obj.http.foo1 = "1";
 
13
                if (beresp.http.foo ~ "bar") {
 
14
                        set beresp.http.foo1 = "1";
 
15
                } else {
 
16
                        error 999;
15
17
                }
16
 
                if (obj.http.bar !~ "bar") {
17
 
                        set obj.http.bar1 = "1";
 
18
                if (beresp.http.bar !~ "bar") {
 
19
                        set beresp.http.bar1 = "2";
 
20
                } else {
 
21
                        error 999;
18
22
                }
19
23
        }
20
24
 
24
28
        txreq
25
29
        rxresp
26
30
        expect resp.http.foo1 == "1"
27
 
        expect resp.http.bar1 == "1"
 
31
        expect resp.http.bar1 == "2"
28
32
} -run