Annotation of embedaddon/php/ext/standard/tests/file/bug40501.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #40501 (fgetcsv() can't handle trailing odd number of backslashes)
! 3: --FILE--
! 4: <?php
! 5: $file = dirname(__FILE__).'/bug40501.csv';
! 6:
! 7: $h = fopen($file, 'r');
! 8: $data = fgetcsv($h, NULL, ',', '"', '"');
! 9: fclose($h);
! 10:
! 11: var_dump($data);
! 12: ?>
! 13: --EXPECTF--
! 14: array(2) {
! 15: [0]=>
! 16: string(%d) "this element contains the delimiter, and ends with an odd number of
! 17: backslashes (ex: 1)\"
! 18: [1]=>
! 19: string(%d) "and it isn't the last element$"
! 20: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>