~spuul/nginx/trunk

« back to all changes in this revision

Viewing changes to debian/modules/nginx-lua/t/038-match-o.t

  • Committer: Package Import Robot
  • Author(s): Christos Trochalakis, Christos Trochalakis
  • Date: 2014-02-13 11:41:49 UTC
  • mfrom: (1.3.32)
  • mto: This revision was merged to the branch mainline in revision 72.
  • Revision ID: package-import@ubuntu.com-20140213114149-tkp78c45rzu3wr6y
Tags: 1.4.5-1
[ Christos Trochalakis ]
* New upstream release.
* debian/modules/nginx-lua:
  + Update nginx-lua to v0.9.4
* debian/nginx-naxsi-ui.preinst:
  + Fix exit status issue (Closes: #735152)
* debian/control:
  + Fix arch:all to arch:any dependencies
  + Make nginx depend on specific flavor version
* debian/nginx-*.postinst:
  + Make nginx start by default (Closes: #735551)
* debian/nginx-*.prerm:
  + No need to check for invoke-rc.d,
    correctly set the exit code on error
* debian/nginx-common.nginx.init:
  + Rewrite some parts of the initscript
  + Introduce rotate command
  + Introduce upgrade command

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# vim:set ft= ts=4 sw=4 et fdm=marker:
2
2
use lib 'lib';
3
 
use Test::Nginx::Socket;
 
3
use Test::Nginx::Socket::Lua;
4
4
 
5
5
#worker_connections(1014);
6
6
#master_on();
338
338
--- request
339
339
    GET /re
340
340
--- response_body
341
 
error: failed to compile regex "(abc": pcre_compile() failed: missing ) in "(abc"
 
341
error: pcre_compile() failed: missing ) in "(abc"
342
342
--- no_error_log
343
343
[error]
344
344
 
362
362
    }
363
363
--- request
364
364
    GET /re
365
 
--- response_body
366
 
error: bad argument #3 to '?' (unknown flag "H")
 
365
--- response_body_like chop
 
366
^error: .*?unknown flag "H"
367
367
 
368
368
 
369
369
 
471
471
    GET /re
472
472
--- response_body
473
473
1234
474
 
4
 
474
5
475
475
 
476
476
 
477
477
 
479
479
--- config
480
480
    location /re {
481
481
        content_by_lua '
482
 
            local ctx = { pos = 2 }
 
482
            local ctx = { pos = 3 }
483
483
            m = ngx.re.match("1234, hello", "([0-9]+)", "o", ctx)
484
484
            if m then
485
485
                ngx.say(m[0])
494
494
    GET /re
495
495
--- response_body
496
496
34
497
 
4
 
497
5
498
498
 
499
499
 
500
500
 
574
574
            ngx.say(m and m[0])
575
575
            ngx.say(ctx.pos)
576
576
 
577
 
            ctx.pos = 0
 
577
            ctx.pos = 1
578
578
            m = ngx.re.match("hi, 1234", "([A-Z]+)", "o", ctx)
579
579
            ngx.say(m and m[0])
580
580
            ngx.say(ctx.pos)
584
584
    GET /re
585
585
--- response_body
586
586
hello
587
 
5
 
587
6
588
588
okay
589
 
10
 
589
11
590
590
nil
591
 
0
 
591
1
592
592
 
593
593
 
594
594