Annotation of embedaddon/php/ext/zlib/tests/007.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: gzencode() and invalid params
                      3: --SKIPIF--
                      4: <?php if (!extension_loaded("zlib")) print "skip"; ?>
                      5: --FILE--
                      6: <?php
                      7: 
                      8: var_dump(gzencode());
                      9: var_dump(gzencode(1,1,1,1));
                     10: var_dump(gzencode("", -10));
                     11: var_dump(gzencode("", 100));
                     12: var_dump(gzencode("", 1, 100));
                     13: 
                     14: var_dump(gzencode("", -1, 1));
                     15: var_dump(gzencode("", 9, 2));
                     16: 
                     17: $string = "Light of my sun
                     18: Light in this temple
                     19: Light in my truth
                     20: Lies in the darkness";
                     21: 
                     22: var_dump(gzencode($string, 9, 3));
                     23: 
                     24: var_dump(gzencode($string, -1, 1));
                     25: var_dump(gzencode($string, 9, 2));
                     26: 
                     27: echo "Done\n";
                     28: ?>
                     29: --EXPECTF--    
                     30: Warning: gzencode() expects at least 1 parameter, 0 given in %s on line %d
                     31: NULL
                     32: 
                     33: Warning: gzencode() expects at most 3 parameters, 4 given in %s on line %d
                     34: NULL
                     35: 
                     36: Warning: gzencode(): compression level(-10) must be within -1..9 in %s on line %d
                     37: bool(false)
                     38: 
                     39: Warning: gzencode(): compression level(100) must be within -1..9 in %s on line %d
                     40: bool(false)
                     41: 
                     42: Warning: gzencode(): encoding mode must be FORCE_GZIP or FORCE_DEFLATE in %s on line %d
                     43: bool(false)
                     44: string(%d) "%s"
                     45: string(%d) "%s"
                     46: 
                     47: Warning: gzencode(): encoding mode must be FORCE_GZIP or FORCE_DEFLATE in %s on line %d
                     48: bool(false)
                     49: string(%d) "%s"
                     50: string(%d) "%s"
                     51: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>