Mercurial > hg > nginx-tests
comparison proxy_cookie.t @ 392:c28ecaef065f
Tests: try_run() introduced.
This method replaces multiple ad-hoc solutions to grecefully skip tests if
nginx startup fails, e.g., due to no support for a particular directive.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 18 Apr 2014 18:36:26 +0400 |
parents | 0ca8725e5958 |
children | 847ea345becb |
comparison
equal
deleted
inserted
replaced
391:915ef26ac6eb | 392:c28ecaef065f |
---|---|
71 } | 71 } |
72 } | 72 } |
73 | 73 |
74 EOF | 74 EOF |
75 | 75 |
76 eval { | 76 $t->try_run('no proxy_cookie')->plan(8); |
77 open OLDERR, ">&", \*STDERR; close STDERR; | |
78 $t->run(); | |
79 open STDERR, ">&", \*OLDERR; | |
80 }; | |
81 plan(skip_all => 'no proxy_cookie') if $@; | |
82 | |
83 $t->plan(8); | |
84 | 77 |
85 ############################################################################### | 78 ############################################################################### |
86 | 79 |
87 is(http_get_set_cookie('/?domain=www.Example.org'), | 80 is(http_get_set_cookie('/?domain=www.Example.org'), |
88 'v=path=domain=; Domain=example.com', 'domain rewrite'); | 81 'v=path=domain=; Domain=example.com', 'domain rewrite'); |