You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
use Test::Nginx::Socket::Lua no_plan;
use Cwd qw(cwd abs_path);
use File::Basename qw(dirname);
use lib dirname(abs_path $0);
use Var::Conf qw(Headers);
$ENV{TEST_NGINX_CODE_PWD} = cwd();
#repeat_each(2);
no_long_string();
run_tests();
__DATA__
=== TEST 1: basic resty test
--- http_config
init_worker_by_lua_block {
print("init")
}
--- config
location = /t {
echo ok;
}
--- more_headers eval: $Var::Conf::Headers
--- request
GET /t
--- response_body
ok
then , run the cmd: prove t/test.t
will give the warning of uninitialized value
Use of uninitialized value $key in lc at /usr/local/share/perl/5.18.2/Test/Nginx/Socket.pm line 301, <DATA> line 1.
Use of uninitialized value $key in concatenation (.) or string at /usr/local/share/perl/5.18.2/Test/Nginx/Socket.pm line 306, <DATA> line 1.
t/test.t .. ok
All tests successful.
Files=1, Tests=2, 0 wallclock secs ( 0.02 usr 0.01 sys + 0.18 cusr 0.04 csys = 0.25 CPU)
Result: PASS
if i replace the --- more_headers eval: $Var::Conf::Headers in test.t, with
this is my
t
directory layout:the content of Conf.pm
the content of test.t
then , run the cmd:
prove t/test.t
will give the warning of uninitialized value
if i replace the
--- more_headers eval: $Var::Conf::Headers
in test.t, withthe warning message gone.
============================================
OS: Ubuntu 14.04
Test:Nginx v0.25
perl -v
give me this:nginx -v
output:The text was updated successfully, but these errors were encountered: