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

1.1       misho       1: --TEST--
                      2: Test vprintf() function : basic functionality - unsigned format
                      3: --SKIPIF--
                      4: <?php
                      5: if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platform only");
                      6: ?>
                      7: --FILE--
                      8: <?php
                      9: /* Prototype  : string vprintf(string $format , aaray $args)
                     10:  * Description: Output a formatted string 
                     11:  * Source code: ext/standard/formatted_print.c
                     12: */
                     13: 
                     14: echo "*** Testing vprintf() : basic functionality - using unsigned format ***\n";
                     15: 
                     16: // Initialise all required variables
                     17: $format = "format";
                     18: $format1 = "%u";
                     19: $format2 = "%u %u";
                     20: $format3 = "%u %u %u";
                     21: $arg1 = array(-1111);
                     22: $arg2 = array(-1111,-1234567);
                     23: $arg3 = array(-1111,-1234567,-2345432);
                     24: 
                     25: $result = vprintf($format1,$arg1);
                     26: echo "\n";
                     27: var_dump($result);
                     28: 
                     29: $result = vprintf($format2,$arg2);
                     30: echo "\n";
                     31: var_dump($result);
                     32: 
                     33: $result = vprintf($format3,$arg3);
                     34: echo "\n";
                     35: var_dump($result);
                     36: 
                     37: ?>
                     38: ===DONE===
                     39: --EXPECT--
                     40: *** Testing vprintf() : basic functionality - using unsigned format ***
                     41: 4294966185
                     42: int(10)
                     43: 4294966185 4293732729
                     44: int(21)
                     45: 4294966185 4293732729 4292621864
                     46: int(32)
                     47: ===DONE===

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