From 28a5871e87982b3ed08d8d8eee73a039754bc325 Mon Sep 17 00:00:00 2001 From: andy wharmby Date: Tue, 20 Jan 2009 23:37:49 +0000 Subject: [PATCH] New gzinflate() error test. Tested on WIndows, Linux and Linux 64 bit --- ext/zlib/tests/gzinflate_error1.phpt | 83 ++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 ext/zlib/tests/gzinflate_error1.phpt diff --git a/ext/zlib/tests/gzinflate_error1.phpt b/ext/zlib/tests/gzinflate_error1.phpt new file mode 100644 index 0000000000..3fbe3b22bf --- /dev/null +++ b/ext/zlib/tests/gzinflate_error1.phpt @@ -0,0 +1,83 @@ +--TEST-- +Test gzinflate() function : error conditions +--SKIPIF-- + +--FILE-- + +===DONE=== +--EXPECTF-- +*** Testing gzinflate() : error conditions *** + +-- Testing gzcompress() function with Zero arguments -- + +Warning: gzinflate() expects at least 1 parameter, 0 given in %s on line %d +NULL + +-- Testing gzcompress() function with more than expected no. of arguments -- + +Warning: gzinflate() expects at most 2 parameters, 3 given in %s on line %d +NULL + +-- Testing with Unicode string -- + +Warning: gzinflate() expects parameter 1 to be strictly a binary string, Unicode string given in %s on line %d +NULL + +-- Testing with a buffer that is too small -- + +Warning: gzinflate(): data error in %s on line %d +bool(false) + +-- Testing with incorrect parameters -- + +Warning: gzinflate() expects parameter 1 to be binary string, object given in %s on line %d +NULL + +Warning: gzinflate() expects parameter 2 to be long, object given in %s on line %d +NULL +===DONE=== \ No newline at end of file -- 2.40.0