changeset 417:1bdd58f388f6

Tests: weak etag tests.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 23 Jun 2014 00:31:50 +0400
parents 5c25acbc870a
children 861e6cad6299
files not_modified.t
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/not_modified.t
+++ b/not_modified.t
@@ -21,7 +21,7 @@ use Test::Nginx;
 select STDERR; $| = 1;
 select STDOUT; $| = 1;
 
-my $t = Test::Nginx->new()->has('http')->plan(12)
+my $t = Test::Nginx->new()->has('http')->plan(14)
 	->write_file_expand('nginx.conf', <<'EOF');
 
 %%TEST_GLOBALS%%
@@ -80,11 +80,19 @@ like(http_get_inm('/t', '"foo", "bar", '
 	'if-none-match with complex list');
 like(http_get_inm('/t', '*'), qr/304/, 'if-none-match all');
 
+TODO: {
+local $TODO = 'not yet';
+
+like(http_get_inm('/t', 'W/' . $etag), qr/304/, 'if-none-match weak');
+
+}
+
 like(http_get_im('/t', $etag), qr/200/, 'if-match');
 like(http_get_im('/t', '"foo"'), qr/412/, 'if-match fail');
 like(http_get_im('/t', '"foo", "bar", ' . "\t" . $etag . ' , "baz"'),
 	qr/200/, 'if-match with complex list');
 like(http_get_im('/t', '*'), qr/200/, 'if-match all');
+like(http_get_im('/t', 'W/' . $etag), qr/412/, 'if-match weak fail');
 
 ###############################################################################