DBIx-SearchBuilder
view release on metacpan or search on metacpan
t/01records.t view on Meta::CPAN
is($val, '123456789012345678', 'truncate by length attribute');
# Confirm we truncate before comparing values and
# don't try to update again with the same value
($val,$msg) = $rec->SetName('1234567890123456789012345678901234567890');
ok(!$val, $msg);
is($msg, 'That is already the current value', 'No update for same value');
is($rec->Name, '12345678901234', "Value is the same");
# Test unicode truncation:
my $univalue = "鿝忏¬è©¦";
($val,$msg) = $rec->SetName($univalue.$univalue);
ok($val, $msg) ;
is($rec->Name, '鿝忏¬');
# make sure we do _not_ truncate things which should not be truncated
($val,$msg) = $rec->SetEmployeeId('1234567890');
ok($val, $msg) ;
( run in 0.541 second using v1.01-cache-2.11-cpan-88abd93f124 )