Mercurial > hg > nginx-tests
annotate sub_filter_multi.t @ 1990:85d88cd5091c
Tests: SSI include stub tests.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Thu, 04 Jul 2024 17:42:55 +0300 |
parents | b5c1c3ef2345 |
children |
rev | line source |
---|---|
648
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
1 #!/usr/bin/perl |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
2 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
3 # (C) Dmitry Volyntsev |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
4 # (C) Nginx, Inc. |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
5 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
6 # Tests for multiple patterns in sub filter. |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
7 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
8 ############################################################################### |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
9 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
10 use warnings; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
11 use strict; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
12 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
13 use Test::More; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
14 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
15 BEGIN { use FindBin; chdir($FindBin::Bin); } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
16 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
17 use lib 'lib'; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
18 use Test::Nginx; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
19 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
20 ############################################################################### |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
21 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
22 select STDERR; $| = 1; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
23 select STDOUT; $| = 1; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
24 |
1020
196d33c2bb45
Tests: removed TODO and try_run() checks for legacy versions.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
974
diff
changeset
|
25 my $t = Test::Nginx->new()->has(qw/http rewrite sub proxy/)->plan(42); |
648
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
26 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
27 my $long_pattern = '0123456789abcdef' x 17; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
28 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
29 (my $conf = <<'EOF') =~ s/%%LONG_PATTERN%%/$long_pattern/g; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
30 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
31 %%TEST_GLOBALS%% |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
32 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
33 daemon off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
34 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
35 events { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
36 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
37 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
38 http { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
39 %%TEST_GLOBALS_HTTP%% |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
40 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
41 server { |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
42 listen 127.0.0.1:8080; |
648
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
43 server_name localhost; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
44 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
45 sub_filter_types *; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
46 sub_filter foo bar; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
47 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
48 location /multi { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
49 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
50 sub_filter aab +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
51 sub_filter yyz -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
52 return 200 $arg_a; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
53 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
54 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
55 location /multi2 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
56 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
57 sub_filter aabb +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
58 sub_filter aaabb -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
59 return 200 $arg_a; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
60 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
61 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
62 location /multi3 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
63 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
64 sub_filter aacbb +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
65 sub_filter aadbb -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
66 return 200 $arg_a; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
67 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
68 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
69 location /case { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
70 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
71 sub_filter AAB +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
72 sub_filter YYZ -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
73 return 200 $arg_a; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
74 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
75 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
76 location /case2 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
77 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
78 sub_filter ABCDEFGHIJKLMNOPQRSTUVWXYZ +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
79 return 200 $arg_a; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
80 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
81 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
82 location /case3 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
83 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
84 sub_filter abcdefghijklmnopqrstuvwxyz +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
85 return 200 $arg_a; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
86 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
87 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
88 location /minimal { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
89 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
90 sub_filter ab +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
91 sub_filter cd -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
92 sub_filter ef *; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
93 sub_filter gh !; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
94 sub_filter x _; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
95 return 200 $arg_a; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
96 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
97 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
98 location /once { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
99 sub_filter aab +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
100 sub_filter yyz -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
101 return 200 $arg_a; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
102 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
103 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
104 location /table/inheritance { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
105 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
106 return 200 $arg_a; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
107 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
108 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
109 location /utf8 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
110 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
111 sub_filter 模様 замена1; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
112 sub_filter पैटर्न замена2; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
113 sub_filter паттерн replaced; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
114 return 200 $arg_a; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
115 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
116 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
117 location /var/replacement/multi { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
118 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
119 sub_filter aab '${arg_a}_replaced'; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
120 sub_filter yyz '${arg_b}_replaced'; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
121 return 200 $arg_c; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
122 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
123 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
124 location /crossbuf/match1 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
125 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
126 sub_filter abpattyz +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
127 alias %%TESTDIR%%/; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
128 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
129 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
130 location /crossbuf/match2 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
131 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
132 sub_filter abpattrnyz +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
133 alias %%TESTDIR%%/; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
134 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
135 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
136 location /crossbuf/match3 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
137 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
138 sub_filter abpatternyz +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
139 alias %%TESTDIR%%/; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
140 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
141 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
142 location /crossbuf/match4 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
143 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
144 sub_filter abpattternyz +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
145 alias %%TESTDIR%%/; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
146 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
147 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
148 location /crossbuf/match5-01 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
149 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
150 sub_filter abyz +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
151 sub_filter abpattternyz -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
152 alias %%TESTDIR%%/; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
153 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
154 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
155 location /crossbuf/match5-02 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
156 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
157 sub_filter abpayz +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
158 sub_filter abpattternyz -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
159 alias %%TESTDIR%%/; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
160 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
161 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
162 location /crossbuf/match6 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
163 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
164 sub_filter abpattxernyz +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
165 sub_filter abpattternyz -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
166 alias %%TESTDIR%%/; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
167 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
168 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
169 location /crossbuf/superlong/match1 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
170 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
171 sub_filter %%LONG_PATTERN%% +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
172 alias %%TESTDIR%%/; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
173 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
174 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
175 location /crossbuf/superlong/match2 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
176 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
177 sub_filter %%LONG_PATTERN%% +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
178 sub_filter yz -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
179 alias %%TESTDIR%%/; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
180 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
181 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
182 location /crossbuf/superlong/match3 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
183 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
184 sub_filter %%LONG_PATTERN%% +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
185 sub_filter 01ef -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
186 alias %%TESTDIR%%/; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
187 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
188 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
189 location /crossbuf/superlong/match4 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
190 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
191 sub_filter %%LONG_PATTERN%% +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
192 sub_filter 01ef -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
193 sub_filter _ *; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
194 alias %%TESTDIR%%/; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
195 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
196 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
197 location /shortbuf/match1 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
198 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
199 sub_filter abpatternyz +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
200 |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
201 proxy_pass http://127.0.0.1:8081/; |
648
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
202 proxy_buffering off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
203 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
204 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
205 location /shortbuf/match2 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
206 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
207 sub_filter abpatternyz +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
208 sub_filter abpaernyz -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
209 |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
210 proxy_pass http://127.0.0.1:8081/; |
648
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
211 proxy_buffering off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
212 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
213 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
214 location /shortbuf/match3 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
215 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
216 sub_filter abpatternyz +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
217 sub_filter abpaernyz -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
218 sub_filter _ *; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
219 |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
220 proxy_pass http://127.0.0.1:8081/; |
648
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
221 proxy_buffering off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
222 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
223 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
224 location /shortbuf/match4 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
225 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
226 sub_filter patt +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
227 |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
228 proxy_pass http://127.0.0.1:8081/; |
648
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
229 proxy_buffering off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
230 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
231 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
232 location /shortbuf/match5 { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
233 sub_filter_once off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
234 sub_filter abpatternyz +; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
235 sub_filter abpa -; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
236 sub_filter tter *; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
237 |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
238 proxy_pass http://127.0.0.1:8081/; |
648
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
239 proxy_buffering off; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
240 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
241 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
242 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
243 server { |
974
882267679006
Tests: simplified parallel modifications in tests.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
952
diff
changeset
|
244 listen 127.0.0.1:8081; |
648
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
245 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
246 limit_rate 4; |
1988
b5c1c3ef2345
Tests: adjusted sub_filter_multi.t limit rate settings.
Maxim Dounin <mdounin@mdounin.ru>
parents:
1020
diff
changeset
|
247 limit_rate_after 170; |
648
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
248 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
249 location / { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
250 return 200 $arg_a; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
251 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
252 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
253 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
254 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
255 EOF |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
256 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
257 $t->write_file_expand('nginx.conf', $conf); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
258 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
259 $t->write_file('huge1.html', 'abpattyz' x 6000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
260 $t->write_file('huge2.html', 'abpattrnyz' x 5000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
261 $t->write_file('huge3.html', 'abpatternyz' x 4000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
262 $t->write_file('huge4.html', 'abpattternyz' x 4000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
263 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
264 $t->write_file('huge5-01.html', 'abpatternyzA' x 4000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
265 $t->write_file('huge5-02.html', 'abpatternyzABCDEFGHIJ' x 4000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
266 $t->write_file('huge5-03.html', 'abpatternyzABCDEFGHIJK' x 4000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
267 $t->write_file('huge5-04.html', 'abpatternyzABCDEFGHIJKL' x 4000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
268 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
269 $t->write_file('huge6-01.html', 'abyzAabpattternyz' x 3000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
270 $t->write_file('huge6-02.html', 'abpayzAabpattternyz' x 3000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
271 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
272 $t->write_file('huge7-01.html', 'abpattxernyzabpattternyz' x 3000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
273 $t->write_file('huge7-02.html', 'abpattxernyzAabpattternyz' x 3000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
274 $t->write_file('huge7-03.html', 'abpattxernyzABCDEFGHIJabpattternyz' x 3000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
275 $t->write_file('huge7-04.html', 'abpattxernyzABCDEFGHIJKabpattternyz' x 3000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
276 $t->write_file('huge7-05.html', 'abpattxernyzABCDEFGHIJKLabpattternyz' x 3000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
277 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
278 $t->write_file('huge8.html', scalar ('ABC' . $long_pattern . 'XYZ') x 1000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
279 $t->write_file('huge9.html', scalar ('ABC' . $long_pattern . 'yz') x 1000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
280 $t->write_file('huge10-01.html', scalar ($long_pattern . 'ABC01ef') x 1000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
281 $t->write_file('huge10-02.html', scalar ('01efABC' . $long_pattern) x 1000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
282 $t->write_file('huge11.html', scalar ('01efA_Z' . $long_pattern) x 1000); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
283 |
1020
196d33c2bb45
Tests: removed TODO and try_run() checks for legacy versions.
Andrey Zelenkov <zelenkov@nginx.com>
parents:
974
diff
changeset
|
284 $t->run(); |
648
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
285 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
286 ############################################################################### |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
287 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
288 like(http_get('/multi?a=aabAyyzBaab'), qr/\+A-B\+/, 'simple match'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
289 like(http_get('/multi2?a=aabbaaabbaabb'), qr/\+-\+/, 'partial match'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
290 like(http_get('/multi3?a=aadbbaacbb'), qr/-\+/, 'exact match'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
291 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
292 like(http_get('/multi?a=AABYYZAAB'), qr/\+-\+/, 'case insensivity 1'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
293 like(http_get('/case?a=aabyyzaab'), qr/\+-\+/, 'case insensivity 2'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
294 like(http_get('/case2?a=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
295 qr/\+\+/, 'case insensivity 3'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
296 like(http_get('/case3?a=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
297 qr/\+\+/, 'case insensivity 4'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
298 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
299 like(http_get('/minimal?a=AAabcdefghBxBabCxCcdDDefEEghFF'), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
300 qr/AA\+-\*!B_B\+C_C-DD\*EE!FF/, 'minimal match'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
301 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
302 like(http_get('/utf8?a=ТЕКСТ模様ТЕКСТ2पैटर्नТЕКСТ3паттерн'), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
303 qr/ТЕКСТзамена1ТЕКСТ2замена2ТЕКСТ3replaced/, 'utf8 match'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
304 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
305 like(http_get('/once?a=aabyyzaab'), qr/\+-aab/, 'once 1'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
306 like(http_get('/once?a=yyzaabyyz'), qr/-\+yyz/, 'once 2'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
307 like(http_get('/once?a=yyzyyzaabaabyyz'), qr/-yyz\+aabyyz/, 'once 3'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
308 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
309 like(http_get('/table/inheritance?a=foofoo'), qr/barbar/, 'table inheritance'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
310 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
311 like(http_get('/var/replacement/multi?a=A&b=B&c=aabyyzaab'), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
312 qr/A_replacedB_replacedA_replaced/, 'complex multiple replace'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
313 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
314 like(http_get('/crossbuf/match1/huge1.html'), qr/\+{6000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
315 'crossbuf match 1 (simple match len 8)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
316 like(http_get('/crossbuf/match2/huge2.html'), qr/\+{5000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
317 'crossbuf match 2 (simple match len 9)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
318 like(http_get('/crossbuf/match3/huge3.html'), qr/\+{4000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
319 'crossbuf match 3 (simple match len 10)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
320 like(http_get('/crossbuf/match4/huge4.html'), qr/\+{4000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
321 'crossbuf match 4 (simple match len 11)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
322 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
323 like(http_get('/crossbuf/match3/huge5-01.html'), qr/(\+A){4000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
324 'crossbuf match 5.1'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
325 like(http_get('/crossbuf/match3/huge5-02.html'), qr/(\+ABCDEFGHIJ){4000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
326 'crossbuf match 5.2'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
327 like(http_get('/crossbuf/match3/huge5-03.html'), qr/(\+ABCDEFGHIJK){4000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
328 'crossbuf match 5.3'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
329 like(http_get('/crossbuf/match3/huge5-04.html'), qr/(\+ABCDEFGHIJKL){4000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
330 'crossbuf match 5.4'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
331 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
332 like(http_get('/crossbuf/match5-01/huge6-01.html'), qr/(\+A-){3000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
333 'crossbuf match 6.1 (multiple replace)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
334 like(http_get('/crossbuf/match5-02/huge6-02.html'), qr/(\+A-){3000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
335 'crossbuf match 6.2 (multiple replace)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
336 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
337 like(http_get('/crossbuf/match6/huge7-01.html'), qr/(\+-){3000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
338 'crossbuf match 7.1 (multiple replace)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
339 like(http_get('/crossbuf/match6/huge7-02.html'), qr/(\+A-){3000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
340 'crossbuf match 7.2 (multiple replace)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
341 like(http_get('/crossbuf/match6/huge7-03.html'), qr/(\+ABCDEFGHIJ-){3000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
342 'crossbuf match 7.3 (multiple replace)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
343 like(http_get('/crossbuf/match6/huge7-04.html'), qr/(\+ABCDEFGHIJK-){3000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
344 'crossbuf match 7.4 (multiple replace)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
345 like(http_get('/crossbuf/match6/huge7-05.html'), qr/(\+ABCDEFGHIJKL-){3000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
346 'crossbuf match 7.5 (multiple replace)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
347 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
348 like(http_get('/crossbuf/superlong/match1/huge8.html'), qr/(ABC\+XYZ){1000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
349 'crossbuf superlong match 1'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
350 like(http_get('/crossbuf/superlong/match2/huge9.html'), qr/(ABC\+-){1000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
351 'crossbuf superlong match 2 (multiple replace)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
352 like(http_get('/crossbuf/superlong/match3/huge10-01.html'), qr/(\+ABC-){1000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
353 'crossbuf superlong match 3.1 (multiple replace)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
354 like(http_get('/crossbuf/superlong/match3/huge10-02.html'), qr/(-ABC\+){1000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
355 'crossbuf superlong match 3.2 (multiple replace)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
356 like(http_get('/crossbuf/superlong/match4/huge11.html'), qr/(-A\*Z\+){1000}/, |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
357 'crossbuf superlong match 4 (1 byte search pattern)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
358 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
359 SKIP: { |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
360 skip 'long tests', 8 unless $ENV{TEST_NGINX_UNSAFE}; |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
361 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
362 like(http_get('/shortbuf/match1?a=' . 'abpatternyzA' x 3), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
363 qr/(\+A){3}/, 'shortbuf match 1.1'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
364 like(http_get('/shortbuf/match1?a=' . 'abpatternyzABCD' x 3), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
365 qr/(\+ABCD){3}/, 'shortbuf match 1.2'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
366 like(http_get('/shortbuf/match1?a=' . 'abpatternyzABCDE' x 3), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
367 qr/(\+ABCDE){3}/, 'shortbuf match 1.3'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
368 like(http_get('/shortbuf/match2?a=' . 'abpatternyzAabpaernyzB' x 2), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
369 qr/(\+A-B){2}/, 'shortbuf match 2.1 (multiple replace)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
370 like(http_get('/shortbuf/match2?a=' . 'abpatternyzAabpaernyz' x 2), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
371 qr/(\+A-){2}/, 'shortbuf match 2.2 (multiple replace)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
372 like(http_get('/shortbuf/match3?a=' . 'abpatternyzA_' x 3), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
373 qr/(\+A\*){3}/, 'shortbuf match 3 (1 byte search pattern)'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
374 like(http_get('/shortbuf/match4?a=' . 'pattABCDEFGHI' x 3), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
375 qr/(\+ABCDEFGHI){3}/, 'shortbuf match 4'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
376 like(http_get('/shortbuf/match5?a=abpatternyzABCDE' . 'abpatternyABCDE' x 2), |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
377 qr/\+ABCDE(-\*nyABCDE){2}/, 'shortbuf match 5'); |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
378 } |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
379 |
2f1b10b3ff61
Tests: sub filter tests with multiple strings to replace.
Dmitry Volyntsev <xeioex@nginx.com>
parents:
diff
changeset
|
380 ############################################################################### |