File tree 5 files changed +12
-10
lines changed
5 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ use Test::More;
15
15
BEGIN { use FindBin; chdir ($FindBin::Bin ); }
16
16
17
17
use lib ' lib' ;
18
- use Test::Nginx;
18
+ use Test::Nginx qw/ :DEFAULT http_content / ;
19
19
20
20
# ##############################################################################
21
21
@@ -185,7 +185,7 @@ GET / HTTP/1.0
185
185
Host: $host
186
186
187
187
EOF
188
- return ($all ? $r : Test::Nginx:: http_content($r ));
188
+ return ($all ? $r : http_content($r ));
189
189
}
190
190
191
191
sub http_absolute_path {
@@ -195,7 +195,7 @@ GET http://$host/ HTTP/1.0
195
195
Host: localhost
196
196
197
197
EOF
198
- return ($all ? $r : Test::Nginx:: http_content($r ));
198
+ return ($all ? $r : http_content($r ));
199
199
}
200
200
201
201
# ##############################################################################
Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ use strict;
12
12
use base qw/ Exporter / ;
13
13
14
14
our @EXPORT = qw/ log_in log_out http http_get http_head port / ;
15
- our @EXPORT_OK = qw/ http_gzip_request http_gzip_like http_start http_end / ;
15
+ our @EXPORT_OK = qw/
16
+ http_gzip_request http_gzip_like http_start http_end http_content
17
+ / ;
16
18
our %EXPORT_TAGS = (
17
19
gzip => [ qw/ http_gzip_request http_gzip_like / ]
18
20
);
Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ use Test::More;
16
16
BEGIN { use FindBin; chdir ($FindBin::Bin ); }
17
17
18
18
use lib ' lib' ;
19
- use Test::Nginx;
19
+ use Test::Nginx qw/ :DEFAULT http_content / ;
20
20
21
21
# ##############################################################################
22
22
@@ -144,7 +144,7 @@ sub durations {
144
144
$uri .= " ?end=$end " ;
145
145
}
146
146
147
- $t -> write_file(' frag.mp4' , Test::Nginx:: http_content(http_get($uri )));
147
+ $t -> write_file(' frag.mp4' , http_content(http_get($uri )));
148
148
149
149
my $r = ` ffprobe -show_streams $path 2>/dev/null` ;
150
150
Test::Nginx::log_core(' ||' , $r );
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ use Socket qw/ CRLF /;
24
24
BEGIN { use FindBin; chdir ($FindBin::Bin ); }
25
25
26
26
use lib ' lib' ;
27
- use Test::Nginx;
27
+ use Test::Nginx qw/ :DEFAULT http_content / ;
28
28
29
29
# ##############################################################################
30
30
@@ -144,7 +144,7 @@ chmod(0000, $t->testdir() . '/proxy_temp');
144
144
my $r = http_get_11(' /proxy/big.html' , sleep => 0.5);
145
145
146
146
SKIP: {
147
- skip ' finished' , 1 if length (Test::Nginx:: http_content($r )) == 1024 * 1024 + 8;
147
+ skip ' finished' , 1 if length (http_content($r )) == 1024 * 1024 + 8;
148
148
149
149
like($r , qr / X(?!.*\x0d\x0a ?0\x0d\x0a ?)/ s , ' no proxy temp' );
150
150
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ use Test::More;
17
17
BEGIN { use FindBin; chdir ($FindBin::Bin ); }
18
18
19
19
use lib ' lib' ;
20
- use Test::Nginx;
20
+ use Test::Nginx qw/ :DEFAULT http_content / ;
21
21
22
22
# ##############################################################################
23
23
@@ -83,7 +83,7 @@ local $TODO = 'not yet';
83
83
84
84
$r = get(' /t' , ' Range: bytes=3-4' );
85
85
like($r , qr / 206 / , ' range request - 206 partial reply' );
86
- is(Test::Nginx:: http_content($r ), ' 34' , ' range request - correct content' );
86
+ is(http_content($r ), ' 34' , ' range request - correct content' );
87
87
88
88
}
89
89
You can’t perform that action at this time.
0 commit comments