2 # -----------------------------------------------------------------------------
5 use lib
($0 =~ m
|^(.*/)| ?
$1 : ".");
8 &message
("Check the csv importer.");
10 &test_csv_format_guessing
11 (data
=> <<DATA, format => sub { return $_ eq '0.00'; }, decimal => '.' );
17 &test_csv_format_guessing
18 (data
=> <<DATA, format => sub { return $_ eq '0.00'; }, decimal => ',' );
24 &test_csv_format_guessing
25 (data
=> <<DATA, format => sub { return $_ eq 'General'; }, decimal => '.' );
31 &test_csv_format_guessing
32 (data
=> <<DATA, format => sub { return $_ eq 'General'; }, decimal => ',' );
38 &test_csv_format_guessing
39 (data
=> <<DATA, format => sub { return $_ eq 'General'; }, decimal => '.', thousand => ',' );
45 &test_csv_format_guessing
46 (data
=> <<DATA, format => sub { return $_ eq 'General'; }, decimal => ',', thousand => '.' );
52 &test_csv_format_guessing
53 (data
=> <<DATA, format => sub { return $_ eq 'General'; } );
59 &test_csv_format_guessing
60 (data
=> <<DATA, format => sub { return $_ eq '0.000'; }, decimal => ',' );
65 &test_csv_format_guessing
66 (data
=> <<DATA, format => sub { return $_ eq '0.000'; }, decimal => ',' );
71 &test_csv_format_guessing
72 (data
=> <<DATA, format => sub { return $_ eq '#,##0.00'; }, decimal => '.', thousand => ',' );
77 &test_csv_format_guessing
78 (data
=> <<DATA, format => sub { return $_ eq '#,##0.000'; }, decimal => '.', thousand => ',' );
83 print STDERR
"Pass\n";