Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
File_CSV Test Case bug5257-2: Delimiter problem if first field is empty
3
--FILE--
4
<?php
5
// $Id: bug5257-2.phpt,v 1.1 2008/09/21 21:15:44 dufuz Exp $
6
/**
7
 * Test for:
8
 * - File_CSV::readQuoted()
9
 */
10
 
11
require_once 'File/CSV.php';
12
 
13
$file = dirname(__FILE__) . '/bug5257-2.csv';
14
$conf = File_CSV::discoverFormat($file);
15
echo "Discovered fields: $conf[fields]\n";
16
echo "Format:\n";
17
for ($idx = 0; $idx < 3; ++$idx) {
18
    print_r(File_CSV::readQuoted($file, $conf));
19
    echo "\n";
20
}
21
?>
22
--EXPECT--
23
Discovered fields: 2
24
Format:
25
Array
26
(
27
    [0] =>
28
    [1] => Snargleblarg
29
)
30
 
31
Array
32
(
33
    [0] =>
34
    [1] => OTA
35
)
36
 
37
Array
38
(
39
    [0] =>
40
    [1] => bloa acvnb
41
)