Annotation of embedaddon/php/ext/standard/tests/file/bug53848.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #53848 (fgetcsv removes leading spaces from fields)
                      3: --FILE--
                      4: <?php
                      5: $file = dirname(__FILE__) . "/bug39538.csv";
                      6: @unlink($file);
                      7: file_put_contents($file, "a,b\n  c,  d");
                      8: $fp = fopen($file, "r");
                      9: while ($l = fgetcsv($fp)) var_dump($l);
                     10: fclose($fp);
                     11: @unlink($file);
                     12: ?>
                     13: --EXPECT--
                     14: array(2) {
                     15:   [0]=>
                     16:   string(1) "a"
                     17:   [1]=>
                     18:   string(1) "b"
                     19: }
                     20: array(2) {
                     21:   [0]=>
                     22:   string(3) "  c"
                     23:   [1]=>
                     24:   string(3) "  d"
                     25: }

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