File: combine-undef.t

package info (click to toggle)
libtext-csv-unicode-perl 0.400-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 116 kB
  • sloc: perl: 72; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 462 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use strict;
use warnings;
use Test::More tests => 4; 

require_ok( q(Text::CSV::Unicode) );

my $warn = q{};
$SIG{__WARN__} = sub { $warn .= $_[0]; };

my @array;
$array[1] = 'hello'; 
$array[3] = 'world'; 

my $csv = Text::CSV::Unicode->new( { always_quote => 1 } );
ok $csv->combine(@array), "combine with undef values"; 
is $csv->string, q{,"hello",,"world"}, 
	"combine with undef values - output";
is $warn, q{}, "combine with undef values - no warnings";