Home
last modified time | relevance | path

Searched refs:re (Results 1 – 25 of 28) sorted by relevance

12

/unit/src/
H A Dnxt_pcre.c35 nxt_regex_t *re; in nxt_regex_compile() local
40 if (nxt_slow_path(re == NULL)) { in nxt_regex_compile()
45 pattern = nxt_pointer_to(re, sizeof(nxt_regex_t)); in nxt_regex_compile()
50 re->pattern.length = source->length; in nxt_regex_compile()
51 re->pattern.start = (u_char *) pattern; in nxt_regex_compile()
61 if (nxt_fast_path(re->code != NULL)) { in nxt_regex_compile()
63 re->extra = pcre_study(re->code, PCRE_STUDY_JIT_COMPILE, &err->msg); in nxt_regex_compile()
68 re->extra = NULL; in nxt_regex_compile()
73 re = NULL; in nxt_regex_compile()
79 return re; in nxt_regex_compile()
[all …]
H A Dnxt_pcre2.c29 nxt_regex_t *re; in nxt_regex_compile() local
46 re = nxt_mp_get(mp, sizeof(nxt_regex_t)); in nxt_regex_compile()
47 if (nxt_slow_path(re == NULL)) { in nxt_regex_compile()
51 if (nxt_slow_path(nxt_str_dup(mp, &re->pattern, source) == NULL)) { in nxt_regex_compile()
55 re->code = pcre2_compile((PCRE2_SPTR) source->start, source->length, 0, in nxt_regex_compile()
57 if (nxt_slow_path(re->code == NULL)) { in nxt_regex_compile()
72 errcode = pcre2_jit_compile(re, PCRE2_JIT_COMPLETE); in nxt_regex_compile()
86 return re; in nxt_regex_compile()
133 nxt_regex_match(nxt_regex_t *re, u_char *subject, size_t length, in nxt_regex_match() argument
148 &re->pattern); in nxt_regex_match()
[all …]
H A Dnxt_regex.h36 NXT_EXPORT nxt_int_t nxt_regex_match(nxt_regex_t *re, u_char *subject,
/unit/test/unit/applications/
H A Dproto.py2 import re
19 def findall(self, pattern, name='unit.log', flags=re.M):
21 return re.findall(pattern, f.read(), flags)
23 def search_in_log(self, pattern, name='unit.log', flags=re.M):
25 return re.search(pattern, f.read(), flags)
27 def wait_for_record(self, pattern, name='unit.log', wait=150, flags=re.M):
30 found = re.search(pattern, f.read(), flags)
/unit/auto/
H A Dpcre23 pcre2_code *re;
25 re = pcre2_compile((PCRE2_SPTR)\"\",
28 return (re == NULL);
54 pcre *re;
56 re = pcre_compile(NULL, 0, NULL, 0, NULL);
57 if (re == NULL)
/unit/test/
H A Dtest_php_application.py3 import re
216 assert re.search(
415 assert not re.search(
492 assert not re.search(
509 assert not re.search(
525 assert re.search(
528 assert re.search(
535 assert re.search(
544 assert not re.search(
551 assert re.search(
[all …]
H A Dtest_proxy_chunked.py1 import re
51 m = re.search('\x0d\x0a\x0d\x0a(.*)', data, re.M | re.S)
55 for line in re.split('\r\n', body):
57 m1 = re.search(r'(.*)\sX\s(\d+)', line)
66 for chunk in re.split(r'([@#])', req):
H A Dtest_return.py1 import re
48 assert len(re.findall('200 OK', resp)) == 10
49 assert len(re.findall('Connection:', resp)) == 1
50 assert len(re.findall('Connection: close', resp)) == 1
H A Dtest_variables.py1 import re
96 reg = r'^' + re.escape(req_uri) + r'$'
112 reg = r'^' + re.escape(expect) + r'$'
128 reg = r'^' + re.escape(expect) + r'$'
199 reg = r'^GET ' + re.escape(referer) + r'$'
222 reg = r'^GET ' + re.escape(user_agent) + r'$'
243 reg = r'^' + re.escape(expect) + r'$'
276 reg = r'^' + re.escape(expect) + r'$'
H A Dtest_node_application.py1 import re
55 assert re.search(r'Unit/[\d\.]+', header_server), 'server header'
64 assert re.search(
113 assert re.search(
212 assert re.search(r'200 blah', self.get(raw_resp=True)), 'status message'
H A Dtest_go_application.py1 import re
32 assert re.search(r'Unit/[\d\.]+', header_server), 'server header'
84 assert re.search(
H A Dconftest.py6 import re
189 m = re.search('controller started', log)
202 for module in re.findall(r'module: ([a-zA-Z]+) (.*) ".*"$', log, re.M):
455 z_ppids = re.findall(r'Z\s*(\d+)', out)
489 alerts = re.findall(r'.+\[alert\].+', log)
498 alerts = [al for al in alerts if re.search(skip, al) is None]
503 sanitizer_errors = re.findall('.+Sanitizer.+', log)
591 if re.search(router_pid + r'\s+' + unit_pid + r'.*unit: router', l)
599 if re.search(
708 m = re.search(
[all …]
H A Dtest_respawn.py1 import re
26 m = re.search(r'\s*(\d+)\s*' + str(ppid) + r'.*' + name, output)
44 return re.findall(str(ppid) + r'.*' + name, ps_output)
H A Dtest_ruby_application.py1 import re
29 assert re.search(r'Unit/[\d\.]+', header_server), 'server header'
244 if re.match(pattern, l.upper()) is not None
261 enc_default = re.sub(r'[-_]', '', resp['headers']['X-Enc']).upper()
263 enc_default == re.sub(r'[-_]', '', enc.split('.')[-1]).upper()
H A Dtest_proxy.py1 import re
48 m = re.search(r'X-Len: (\d+)', data)
260 assert re.search(
403 assert re.search('200 OK', sock.recv(100).decode()), 'first'
417 assert re.search('200 OK', sock.recv(100).decode()), 'second'
H A Dtest_settings.py1 import re
195 values = re.findall(
211 assert re.search(r'200 OK', data), 'send timeout status'
217 assert re.search(r'200 OK', data), 'send timeout status 2'
H A Dtest_python_procman.py1 import re
25 for m in re.findall(
28 pids.add(re.search(r'^\s*(\d+)', m).group(1))
H A Dtest_perl_application.py1 import re
28 assert re.search(r'Unit/[\d\.]+', header_server), 'server header'
H A Dtest_upstreams_rr.py2 import re
77 status = re.findall(r'HTTP\/\d\.\d\s(\d\d\d)', resp)
309 m = re.search(r'HTTP/1.1 20(\d)', resp)
H A Dtest_java_application.py3 import re
908 assert re.search(
911 assert re.search(
986 assert re.search(r'sample\.txt created', resp['body']), 'multipart body'
H A Dtest_asgi_application.py1 import re
40 assert re.search(r'Unit/[\d\.]+', header_server), 'server header'
/unit/test/unit/check/
H A Dnjs.py1 import re
5 if re.search('--njs', output_version):
H A Dregex.py1 import re
5 if re.search('--no-regex', output_version):
H A Dtls.py1 import re
11 if re.search('--openssl', output_version):
/unit/test/unit/
H A Dhttp.py5 import re
211 m = re.search(r'(.*?\x0d\x0a?)\x0d\x0a?(.*)', resp, re.M | re.S)
217 headers_lines = re.findall('(.*?)\x0d\x0a?', headers_text, re.M | re.S)
219 status = re.search(
225 m = re.search(r'(.*)\:\s(.*)', line)

12