Skip to content

Commit 6b6fcc3

Browse files
committed
feature: added resty.upload._VERSION.
1 parent fe54a8e commit 6b6fcc3

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

lib/resty/upload.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
module("resty.upload", package.seeall)
44

5+
_VERSION = '0.01'
56

67
local MAX_LINE_SIZE = 512
78

t/version.t

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# vim:set ft= ts=4 sw=4 et:
2+
3+
use Test::Nginx::Socket;
4+
use Cwd qw(cwd);
5+
6+
repeat_each(2);
7+
8+
plan tests => repeat_each() * (3 * blocks());
9+
10+
my $pwd = cwd();
11+
12+
our $HttpConfig = qq{
13+
lua_package_path "$pwd/lib/?.lua;;";
14+
};
15+
16+
$ENV{TEST_NGINX_RESOLVER} = '8.8.8.8';
17+
18+
no_long_string();
19+
#no_diff();
20+
21+
run_tests();
22+
23+
__DATA__
24+
25+
=== TEST 1: basic
26+
--- http_config eval: $::HttpConfig
27+
--- config
28+
location /t {
29+
content_by_lua '
30+
local upload = require "resty.upload"
31+
ngx.say(upload._VERSION)
32+
';
33+
}
34+
--- request
35+
GET /t
36+
--- response_body_like chop
37+
^\d+\.\d+$
38+
--- no_error_log
39+
[error]
40+

0 commit comments

Comments
 (0)