[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SF.net SVN: ledger-smb: [341] trunk/t/02-number-handling.t
- Subject: SF.net SVN: ledger-smb: [341] trunk/t/02-number-handling.t
- From: ..hidden..
- Date: Fri, 27 Oct 2006 12:24:03 -0700
Revision: 341
http://svn.sourceforge.net/ledger-smb/?rev=341&view=rev
Author: tetragon
Date: 2006-10-27 12:23:56 -0700 (Fri, 27 Oct 2006)
Log Message:
-----------
Update tests for parsing of added negation forms
Modified Paths:
--------------
trunk/t/02-number-handling.t
Modified: trunk/t/02-number-handling.t
===================================================================
--- trunk/t/02-number-handling.t 2006-10-27 19:18:44 UTC (rev 340)
+++ trunk/t/02-number-handling.t 2006-10-27 19:23:56 UTC (rev 341)
@@ -106,6 +106,14 @@
cmp_ok($form->parse_amount(\%myconfig, $expected), '==', $value,
"$expected parsed as $formats[$format][0] - $value");
}
+ $expected = '12 CR';
+ my $value = Math::BigFloat->new('12');
+ cmp_ok($form->parse_amount(\%myconfig, $expected), '==', $value,
+ "$expected parsed as $formats[$format][0] - $value");
+ $expected = '21 DR';
+ $value = Math::BigFloat->new('-21');
+ cmp_ok($form->parse_amount(\%myconfig, $expected), '==', $value,
+ "$expected parsed as $formats[$format][0] - $value");
}
foreach my $format (0 .. $#formats) {
@@ -130,4 +138,16 @@
'==', $value,
"$expected parsed as $formats[$format][0] - $value");
}
+ $expected = '12 CR';
+ my $value = Math::BigFloat->new('12');
+ cmp_ok($form->parse_amount(\%myconfig,
+ $form->parse_amount(\%myconfig, $expected)),
+ '==', $value,
+ "$expected parsed as $formats[$format][0] - $value");
+ $expected = '21 DR';
+ $value = Math::BigFloat->new('-21');
+ cmp_ok($form->parse_amount(\%myconfig,
+ $form->parse_amount(\%myconfig, $expected)),
+ '==', $value,
+ "$expected parsed as $formats[$format][0] - $value");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.