comparison mp4.t @ 397:847ea345becb

Tests: removed TODO and try_run() checks for legacy versions.
author Sergey Kandaurov <pluknet@nginx.com>
date Mon, 05 May 2014 11:46:01 +0400
parents 7a65ebfdb02e
children 6c0a5903d0ae
comparison
equal deleted inserted replaced
396:5eb0df61f371 397:847ea345becb
64 64
65 is(durations($t, 0.0), '10.0 20.0', 'start zero'); 65 is(durations($t, 0.0), '10.0 20.0', 'start zero');
66 is(durations($t, 2), '8.0 18.0', 'start integer'); 66 is(durations($t, 2), '8.0 18.0', 'start integer');
67 is(durations($t, 7.1), '2.9 12.9', 'start float'); 67 is(durations($t, 7.1), '2.9 12.9', 'start float');
68 68
69 SKIP: {
70 skip 'no end argument support', 8 unless $t->has_version('1.5.13');
71
72 is(durations($t, 6, 9), '3.0 3.0', 'start end integer'); 69 is(durations($t, 6, 9), '3.0 3.0', 'start end integer');
73 is(durations($t, 2.7, 5.6), '2.9 2.9', 'start end float'); 70 is(durations($t, 2.7, 5.6), '2.9 2.9', 'start end float');
74 71
75 is(durations($t, undef, 9), '9.0 9.0', 'end integer'); 72 is(durations($t, undef, 9), '9.0 9.0', 'end integer');
76 is(durations($t, undef, 5.6), '5.6 5.6', 'end float'); 73 is(durations($t, undef, 5.6), '5.6 5.6', 'end float');
83 # start/end values exceeding track/file duration 80 # start/end values exceeding track/file duration
84 81
85 unlike(http_head("/test.mp4?end=11"), qr!HTTP/1.1 500!, 82 unlike(http_head("/test.mp4?end=11"), qr!HTTP/1.1 500!,
86 'end beyond short track'); 83 'end beyond short track');
87 unlike(http_head("/test.mp4?end=21"), qr!HTTP/1.1 500!, 'end beyond EOF'); 84 unlike(http_head("/test.mp4?end=21"), qr!HTTP/1.1 500!, 'end beyond EOF');
88
89 }
90
91 TODO: {
92 local $TODO = 'not yet' unless $t->has_version('1.5.10');
93
94 unlike(http_head("/test.mp4?start=11"), qr!HTTP/1.1 500!, 85 unlike(http_head("/test.mp4?start=11"), qr!HTTP/1.1 500!,
95 'start beyond short track'); 86 'start beyond short track');
96
97 }
98
99 like(http_head("/test.mp4?start=21"), qr!HTTP/1.1 500!, 'start beyond EOF'); 87 like(http_head("/test.mp4?start=21"), qr!HTTP/1.1 500!, 'start beyond EOF');
100 88
101 # check for alerts, e.g., "zero buf in output", shouldn't be any 89 # check for alerts, e.g., "zero buf in output", shouldn't be any
102 90
103 like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts'); 91 like(`grep -F '[alert]' ${\($t->testdir())}/error.log`, qr/^$/s, 'no alerts');