Annotation of embedaddon/php/ext/standard/tests/strings/vprintf_error.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Test vprintf() function : error conditions 
        !             3: --FILE--
        !             4: <?php
        !             5: /* Prototype  : int vprintf(string $format , array $args)
        !             6:  * Description: Output a formatted string 
        !             7:  * Source code: ext/standard/formatted_print.c
        !             8:  */
        !             9: 
        !            10: echo "*** Testing vprintf() : error conditions ***\n";
        !            11: 
        !            12: // initialising the required variables
        !            13: $format = "%s";
        !            14: $args = array("hello");
        !            15: $extra_arg = "extra arg";
        !            16: 
        !            17: // Zero arguments
        !            18: echo "\n-- Testing vprintf() function with Zero arguments --\n";
        !            19: var_dump( vprintf() );
        !            20: 
        !            21: echo "\n-- Testing vprintf() function with less than expected no. of arguments --\n";
        !            22: var_dump( vprintf($format) );  
        !            23: 
        !            24: echo "\n-- testing vprintf() function with more than expected no. of arguments --\n";
        !            25: var_dump( vprintf($format, $args, $extra_arg) );
        !            26: 
        !            27: ?>
        !            28: ===DONE===
        !            29: --EXPECTF--
        !            30: *** Testing vprintf() : error conditions ***
        !            31: 
        !            32: -- Testing vprintf() function with Zero arguments --
        !            33: 
        !            34: Warning: vprintf() expects at least 1 parameter, 0 given in %s on line %d
        !            35: bool(false)
        !            36: 
        !            37: -- Testing vprintf() function with less than expected no. of arguments --
        !            38: 
        !            39: Warning: Wrong parameter count for vprintf() in %s on line %d
        !            40: bool(false)
        !            41: 
        !            42: -- testing vprintf() function with more than expected no. of arguments --
        !            43: 
        !            44: Warning: Wrong parameter count for vprintf() in %s on line %d
        !            45: bool(false)
        !            46: ===DONE===

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