From: andy wharmby Date: Tue, 20 Jan 2009 23:37:47 +0000 (+0000) Subject: New gzinflate() error test. Tested on WIndows, Linux and Linux 64 bit X-Git-Tag: php-5.3.0beta1~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=65b60a54fe64c36e91322729cbaff3d8b0c9119c;p=php New gzinflate() error test. Tested on WIndows, Linux and Linux 64 bit --- diff --git a/ext/zlib/tests/gzinflate_error1.phpt b/ext/zlib/tests/gzinflate_error1.phpt new file mode 100644 index 0000000000..6dc8113645 --- /dev/null +++ b/ext/zlib/tests/gzinflate_error1.phpt @@ -0,0 +1,75 @@ +--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 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 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