[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb:[3370] trunk/t/02-number-handling.t
- Subject: SF.net SVN: ledger-smb:[3370] trunk/t/02-number-handling.t
- From: ..hidden..
- Date: Tue, 28 Jun 2011 13:05:27 +0000
Revision: 3370
http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3370&view=rev
Author: einhverfr
Date: 2011-06-28 13:05:27 +0000 (Tue, 28 Jun 2011)
Log Message:
-----------
Correcting test failures with number handling tests and NAN's
Modified Paths:
--------------
trunk/t/02-number-handling.t
Modified: trunk/t/02-number-handling.t
===================================================================
--- trunk/t/02-number-handling.t 2011-06-28 12:25:25 UTC (rev 3369)
+++ trunk/t/02-number-handling.t 2011-06-28 13:05:27 UTC (rev 3370)
@@ -181,7 +181,7 @@
$form->{pre} = 'Blah';
$form->{header} = 'Blah';
@r = trap{$form->format_amount({'apples' => '1000.00'}, 'foo', 2)};
-is($trap->exit, 0,
+is($trap->exit, undef,
'form: No numberformat set, invalid amount (NaN check)');
is($trap->stdout, $form_nan_message,
'form: No numberformat set, invalid amount message (NaN check)');
@@ -340,8 +340,8 @@
cmp_ok($form->parse_amount(\%myconfig, ''), '==', 0,
"form: Empty string returns 0");
@r = trap{$form->parse_amount(\%myconfig, 'foo')};
- is($trap->exit, 0,
- 'form: Invalid string gives NaN exit');
+ is($trap->exit, undef,
+ 'form: Invalid string does not exit');
is($trap->stdout, $form_nan_message,
'form: Invalid string gives NaN message');
cmp_ok($lsmb->parse_amount('user' => \%myconfig, 'amount' => ''), '==', 0,
@@ -408,7 +408,7 @@
cmp_ok($form->parse_amount(\%myconfig), '==', 0,
"form: undef string returns 0");
@r = trap{$form->parse_amount(\%myconfig, 'foo')};
- is($trap->exit, 0,
+ is($trap->exit, undef,
'form: Invalid string gives NaN exit');
is($trap->stdout, $form_nan_message,
'form: Invalid string gives NaN message');
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.