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 013: Reading ="" excel only fields
3
--FILE--
4
<?php
5
// $Id: 013.phpt,v 1.2 2007/05/11 21:49:01 cipri Exp $
6
/**
7
 * Test for:
8
 *   - Reading a ="" excel only field as normal "" field
9
 */
10
 
11
require_once 'File/CSV.php';
12
 
13
$file = dirname(__FILE__) . '/013.csv';
14
$conf = File_CSV::discoverFormat($file);
15
$conf['quote'] = '"';
16
print "Format:\n";
17
print_r($conf);
18
print "\n";
19
 
20
$data = array();
21
while ($res = File_CSV::read($file, $conf)) {
22
    $data[] = $res;
23
}
24
 
25
print "Data:\n";
26
print_r($data);
27
print "\n";
28
?>
29
--EXPECT--
30
Format:
31
Array
32
(
33
    [fields] => 3
34
    [sep] => ,
35
    [quote] => "
36
)
37
 
38
Data:
39
Array
40
(
41
    [0] => Array
42
        (
43
            [0] => 004343
44
            [1] =>    Helgi
45
            [2] =>  Project
46
multiline
47
stuff
48
        )
49
 
50
)