summaryrefslogtreecommitdiff
path: root/lua-resty-signal-0.04/t/sanity.t
blob: 07e2cee7aeefd8840b0e99bbf3e009515423798e (plain)
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
34
35
# vi:ft=

use lib '.';
use t::TestKiller;

plan tests => 3 * blocks();

no_long_string();
#no_diff();

run_tests();

__DATA__

=== TEST 1: failure to load librestysignal.so
--- config
    location = /t {
        content_by_lua_block {
            local cpath = package.cpath
            package.cpath = "/foo/?.so;/bar/?.so;"

            local ok, perr = pcall(require, "resty.signal")
            if not ok then
                ngx.say(perr)
            end

            package.cpath = cpath
        }
    }
--- response_body
could not load librestysignal.so from the following paths:
/foo/librestysignal.so
/bar/librestysignal.so
--- no_error_log
[error]