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

1.1       misho       1: --TEST--
                      2: Test vsprintf() 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 vsprintf(string $format , aaray $args)
                     10:  * Description: Return a formatted string 
                     11:  * Source code: ext/standard/formatted_print.c
                     12: */
                     13: 
                     14: echo "*** Testing vsprintf() : 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: var_dump( vsprintf($format1,$arg1) );
                     26: var_dump( vsprintf($format2,$arg2) );
                     27: var_dump( vsprintf($format3,$arg3) );
                     28: 
                     29: echo "Done";
                     30: ?>
                     31: --EXPECTF--
                     32: *** Testing vsprintf() : basic functionality - using unsigned format ***
                     33: string(10) "4294966185"
                     34: string(21) "4294966185 4293732729"
                     35: string(32) "4294966185 4293732729 4292621864"
                     36: Done

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