Annotation of embedaddon/php/ext/standard/tests/strings/quoted_printable_decode_error.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Test quoted_printable_decode() function : error conditions  
                      3: --FILE--
                      4: <?php
                      5: /* Prototype  : string quoted_printable_decode  ( string $str  )
                      6:  * Description: Convert a quoted-printable string to an 8 bit string
                      7:  * Source code: ext/standard/string.c
                      8: */
                      9: 
                     10: echo "*** Testing quoted_printable_decode() : error conditions ***\n";
                     11: 
                     12: echo "\n-- Testing quoted_printable_decode() function with no arguments --\n";
                     13: var_dump( quoted_printable_decode() );
                     14: 
                     15: echo "\n-- Testing quoted_printable_decode() function with more than expected no. of arguments --\n";
                     16: $str = b"=FAwow-factor=C1=d0=D5=DD=C5=CE=CE=D9=C5=0A=   
                     17: =20=D4=cf=D2=C7=CF=D7=D9=C5=       
                     18: =20=           
                     19: =D0=
                     20: =D2=CF=C5=CB=D4=D9"; 
                     21: $extra_arg = 10;
                     22: var_dump( quoted_printable_decode($str, $extra_arg) );
                     23: 
                     24: ?>
                     25: ===DONE===
                     26: --EXPECTF--
                     27: *** Testing quoted_printable_decode() : error conditions ***
                     28: 
                     29: -- Testing quoted_printable_decode() function with no arguments --
                     30: 
                     31: Warning: quoted_printable_decode() expects exactly 1 parameter, 0 given in %s on line %d
                     32: NULL
                     33: 
                     34: -- Testing quoted_printable_decode() function with more than expected no. of arguments --
                     35: 
                     36: Warning: quoted_printable_decode() expects exactly 1 parameter, 2 given in %s on line %d
                     37: NULL
                     38: ===DONE===

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