# HG changeset patch # User Sergey Kandaurov # Date 1396887940 -14400 # Node ID 3d4506565f4330a44f66d8cb8f8856f4893d7318 # Parent ff2e9afde90d49218f38e42ce13aa383dde6fcf7 Tests: more mp4 tests for exceeding start/end values. diff --git a/mp4.t b/mp4.t --- a/mp4.t +++ b/mp4.t @@ -24,7 +24,7 @@ select STDERR; $| = 1; select STDOUT; $| = 1; my $t = Test::Nginx->new()->has(qw/http mp4/)->has_daemon('ffprobe ffmpeg') - ->plan(12)->write_file_expand('nginx.conf', <<'EOF'); + ->plan(14)->write_file_expand('nginx.conf', <<'EOF'); %%TEST_GLOBALS%% @@ -64,7 +64,7 @@ is(durations($t, 2), '8.0 18.0', 'start is(durations($t, 7.1), '2.9 12.9', 'start float'); SKIP: { -skip 'no end argument support', 7 unless $t->has_version('1.5.13'); +skip 'no end argument support', 8 unless $t->has_version('1.5.13'); is(durations($t, 6, 9), '3.0 3.0', 'start end integer'); is(durations($t, 2.7, 5.6), '2.9 2.9', 'start end float'); @@ -81,6 +81,15 @@ like(http_head('/test.mp4?start=1&end=0' unlike(http_head("/test.mp4?end=11"), qr!HTTP/1.1 500!, 'end beyond short track'); +unlike(http_head("/test.mp4?end=21"), qr!HTTP/1.1 500!, 'end beyond EOF'); + +} + +TODO: { +local $TODO = 'not yet' unless $t->has_version('1.5.10'); + +unlike(http_head("/test.mp4?start=11"), qr!HTTP/1.1 500!, + 'start beyond short track'); }