Annotation of embedaddon/php/ext/standard/tests/general_functions/bug49847.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #49847 (exec() fails on lines larger then 4095 bytes)
        !             3: --FILE--
        !             4: <?php
        !             5: $iswin =  substr(PHP_OS, 0, 3) == "WIN";
        !             6: 
        !             7: if ($iswin) {
        !             8:        $f = dirname(__FILE__) . '\\bug49847.tmp';
        !             9:        $s = str_repeat(' ', 4097);
        !            10:        $s .= '1';
        !            11:        file_put_contents($f, $s);
        !            12:        exec('more ' . $f, $output);
        !            13: } else {
        !            14:        exec("printf %4098d 1", $output);
        !            15: }
        !            16: var_dump($output);
        !            17: if ($iswin) {
        !            18:        unlink($f);
        !            19: }
        !            20: ?>
        !            21: --EXPECTF--
        !            22: array(1) {
        !            23:   [0]=>
        !            24:   string(4098) "%s 1"
        !            25: }
        !            26: 

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