File: undef.t

package info (click to toggle)
libdata-pond-perl 0.005-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 160 kB
  • sloc: perl: 285; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 423 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use warnings;
use strict;

use Test::More tests => 7;

BEGIN { use_ok "Data::Pond", qw(pond_write_datum); }

foreach(
	undef,
	[ undef ],
	{ a => undef },
) {
	eval { pond_write_datum($_, {}); };
	like $@, qr/\APond data error: /;
}

is pond_write_datum(undef, {undef_is_empty=>1}), '""';
is pond_write_datum([ undef ], {undef_is_empty=>1}), '[""]';
is pond_write_datum({ a => undef }, {undef_is_empty=>1}), '{a=>""}';

1;