File: phase.t

package info (click to toggle)
lua-resty-core 0.1.31-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,176 kB
  • sloc: perl: 143; sh: 59; makefile: 26
file content (33 lines) | stat: -rw-r--r-- 583 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# vim:set ft= ts=4 sw=4 et fdm=marker:
use lib '.';
use t::TestCore;

repeat_each(2);

plan tests => repeat_each() * (blocks() * 5);

check_accum_error_log();
run_tests();

__DATA__

=== TEST 1: get_phase
--- config
    location /lua {
        content_by_lua_block {
            local phase
            for i = 1, 100 do
                phase = ngx.get_phase()
            end
            ngx.say(phase)
        }
    }
--- request
GET /lua
--- response_body
content
--- no_error_log
[error]
 -- NYI:
--- error_log eval
qr/\[TRACE\s+\d+\s+content_by_lua\(nginx\.conf:\d+\):3 loop\]/