From ffbba62b41eafaa829e6981ac40ca7a61fae633a Mon Sep 17 00:00:00 2001 From: Andrew Krasichkov Date: Thu, 6 Jul 2017 19:43:48 +0300 Subject: [PATCH] More test cases for if parsing --- tests/parser/test_raw_parser.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/parser/test_raw_parser.py b/tests/parser/test_raw_parser.py index 03421f4..605cf90 100644 --- a/tests/parser/test_raw_parser.py +++ b/tests/parser/test_raw_parser.py @@ -232,6 +232,9 @@ def test_if(): if ($request_filename ~* ^.*?/(\d+_)([^/]+)$) { } +if ($http_user_agent ~* "^WordPress.*; verifying pingback") { +} + if ($foo = "BAR") { rewrite ^(.*)$ /bar; } ''' @@ -262,6 +265,8 @@ def test_if(): ]], ['if', ['$request_filename', '~*', '^.*?/(\d+_)([^/]+)$'], [ ]], + ['if', ['$http_user_agent', '~*', '^WordPress.*; verifying pingback'], [ + ]], ['if', ['$foo', '=', 'BAR'], [ ['rewrite', '^(.*)$', '/bar'] ]]