From ecec060bd65badb1139497b30b30cafd1161b50d Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Sun, 11 Feb 2007 17:44:35 +0000 Subject: [PATCH] - tests --- tests/send_data_006.phpt | 1 - tests/send_data_007.phpt | 23 +++++++++++++++++++++++ tests/send_data_008.phpt | 32 ++++++++++++++++++++++++++++++++ tests/send_file_006.phpt | 33 +++++++++++++++++++++++++++++++++ tests/send_file_007.phpt | 22 ++++++++++++++++++++++ 5 files changed, 110 insertions(+), 1 deletion(-) create mode 100644 tests/send_data_007.phpt create mode 100644 tests/send_data_008.phpt create mode 100644 tests/send_file_006.phpt create mode 100644 tests/send_file_007.phpt diff --git a/tests/send_data_006.phpt b/tests/send_data_006.phpt index 7771b8b..43d7a93 100644 --- a/tests/send_data_006.phpt +++ b/tests/send_data_006.phpt @@ -9,7 +9,6 @@ checkcgi(); HTTP_RANGE=bytes=0-3, 4-5,9-11 --FILE-- diff --git a/tests/send_data_007.phpt b/tests/send_data_007.phpt new file mode 100644 index 0000000..91dedaa --- /dev/null +++ b/tests/send_data_007.phpt @@ -0,0 +1,23 @@ +--TEST-- +http_send_data() NIL-NIL range +--SKIPIF-- + +--ENV-- +HTTP_RANGE=bytes=0-0 +--FILE-- + +--EXPECTF-- +Status: 206 +X-Powered-By: PHP/%s +Content-Type: text/plain +Accept-Ranges: bytes +Content-Range: bytes 0-0/3 +Content-Length: 1 + +a diff --git a/tests/send_data_008.phpt b/tests/send_data_008.phpt new file mode 100644 index 0000000..7de621d --- /dev/null +++ b/tests/send_data_008.phpt @@ -0,0 +1,32 @@ +--TEST-- +http_send_data() multiple ranges +--SKIPIF-- + +--ENV-- +HTTP_RANGE=bytes=0-0,-1 +--FILE-- + +--EXPECTF-- +Status: 206 +X-Powered-By: PHP/%s +Accept-Ranges: bytes +Content-Type: multipart/byteranges; boundary=%d.%d + + +--%d.%d +Content-Type: text/plain +Content-Range: bytes 0-0/2 + +0 +--%d.%d +Content-Type: text/plain +Content-Range: bytes 1-1/2 + +1 +--%d.%d-- diff --git a/tests/send_file_006.phpt b/tests/send_file_006.phpt new file mode 100644 index 0000000..e778805 --- /dev/null +++ b/tests/send_file_006.phpt @@ -0,0 +1,33 @@ +--TEST-- +http_send_file() first/last byte range +--SKIPIF-- + +--ENV-- +HTTP_RANGE=bytes=0-0,-1 +--FILE-- + +--EXPECTF-- +Status: 206 +X-Powered-By: PHP/%s +Accept-Ranges: bytes +Content-Type: multipart/byteranges; boundary=%d.%d + + +--%d.%d +Content-Type: text/plain +Content-Range: bytes 0-0/1010 + +0 +--%d.%d +Content-Type: text/plain +Content-Range: bytes 1009-1009/1010 + + + +--%d.%d-- diff --git a/tests/send_file_007.phpt b/tests/send_file_007.phpt new file mode 100644 index 0000000..1ee12cc --- /dev/null +++ b/tests/send_file_007.phpt @@ -0,0 +1,22 @@ +--TEST-- +http_send_file() NIL-NIL range +--SKIPIF-- + +--ENV-- +HTTP_RANGE=bytes=0-0 +--FILE-- + +--EXPECTF-- +Status: 206 +X-Powered-By: PHP/%s +Accept-Ranges: bytes +Content-Range: bytes 0-0/1010 +Content-Length: 1 +Content-type: %s + +0 -- 2.30.2