Annotation of embedaddon/php/ext/standard/tests/file/bug12556.phpt, revision 1.1.1.1
1.1 misho 1: --TEST--
2: Bug #12556 (fgetcsv() ignores lengths when quotes not closed)
3: --FILE--
4: <?php
5: $fp = fopen(dirname(__FILE__)."/test.csv", "r");
6: while($line = fgetcsv($fp, 24)) {
7: $line = str_replace("\x0d\x0a", "\x0a", $line);
8: var_dump($line);
9: }
10: fclose($fp);
11: ?>
12: --EXPECT--
13: array(4) {
14: [0]=>
15: string(1) "6"
16: [1]=>
17: string(1) "7"
18: [2]=>
19: string(1) "8"
20: [3]=>
21: string(5) "line1"
22: }
23: array(4) {
24: [0]=>
25: string(1) "1"
26: [1]=>
27: string(1) "2"
28: [2]=>
29: string(1) "3"
30: [3]=>
31: string(186) "line2
32: 2,4,5,line3
33: 2,4,5,line3
34: 2,4,5,line3
35: 2,4,5,line3
36: 2,4,5,line3
37: 2,4,5,line3
38: 2,4,5,line3
39: 2,4,5,line3
40: 2,4,5,line3
41: 2,4,5,line3
42: 2,4,5,line3
43: 2,4,5,line3
44: 2,4,5,line3
45: 2,4,5,line3
46: 2,4,5,line3
47: "
48: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>