[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [1149] branches/1.2/t



Revision: 1149
          http://svn.sourceforge.net/ledger-smb/?rev=1149&view=rev
Author:   tetragon
Date:     2007-05-06 23:12:03 -0700 (Sun, 06 May 2007)

Log Message:
-----------
More test coverage

Modified Paths:
--------------
    branches/1.2/t/02-number-handling.t
    branches/1.2/t/03-date-handling.t

Modified: branches/1.2/t/02-number-handling.t
===================================================================
--- branches/1.2/t/02-number-handling.t	2007-05-07 06:11:07 UTC (rev 1148)
+++ branches/1.2/t/02-number-handling.t	2007-05-07 06:12:03 UTC (rev 1149)
@@ -51,7 +51,7 @@
 	%myconfig = (numberformat => $formats[$format][0]);
 	my $thou = $formats[$format][1];
 	my $dec = $formats[$format][2];
-	foreach my $rawValue ('10t000d00', '9t999d99', '333d33', 
+	foreach my $rawValue ('10t000d00', '9t999d99', '333d33', '85d50',
 			'7t777t777d77', '-12d34') {
 		$expected = $rawValue;
 		$expected =~ s/t/$thou/gx;
@@ -70,7 +70,7 @@
 	%myconfig = (numberformat => $formats[$format][0]);
 	my $thou = $formats[$format][1];
 	my $dec = $formats[$format][2];
-	foreach my $rawValue ('10t000d00', '9t999d99', '333d33', 
+	foreach my $rawValue ('10t000d00', '9t999d99', '333d33', '85d50',
 			'7t777t777d77', '-12d34') {
 		$expected = $rawValue;
 		$expected =~ s/t/$thou/gx;
@@ -92,7 +92,7 @@
 	%myconfig = ('numberformat' => $formats[$format][0]);
 	my $thou = $formats[$format][1];
 	my $dec = $formats[$format][2];
-	foreach my $rawValue ('10t000d00', '9t999d99', '333d33', 
+	foreach my $rawValue ('10t000d00', '9t999d99', '333d33', '85d50',
 			'7t777t777d77', '-12d34', '(76t543d21)') {
 		$expected = $rawValue;
 		$expected =~ s/t/$thou/gx;
@@ -127,7 +127,7 @@
 	%myconfig = ('numberformat' => $formats[$format][0]);
 	my $thou = $formats[$format][1];
 	my $dec = $formats[$format][2];
-	foreach my $rawValue ('10t000d00', '9t999d99', '333d33', 
+	foreach my $rawValue ('10t000d00', '9t999d99', '333d33', '85d50',
 			'7t777t777d77', '-12d34', '(76t543d21)') {
 		$expected = $rawValue;
 		$expected =~ s/t/$thou/gx;

Modified: branches/1.2/t/03-date-handling.t
===================================================================
--- branches/1.2/t/03-date-handling.t	2007-05-07 06:11:07 UTC (rev 1148)
+++ branches/1.2/t/03-date-handling.t	2007-05-07 06:12:03 UTC (rev 1149)
@@ -50,6 +50,7 @@
 # $locale->date checks
 # Note that $locale->date assumes the year range 2000-2099
 # Note that $locale->date does not perform language-specific long forms
+# Note that $locale->date also takes in yyyymmdd
 foreach my $format (0 .. $#formats) {
 	%myconfig = (dateformat => $formats[$format][0]);
 	my $fmt = $formats[$format][0];
@@ -61,6 +62,8 @@
 		'', "date, $fmt: empty string");
 	cmp_ok($locale_en->date(\%myconfig, $formats[$format][3]), 'eq',
 		$result, "date, $fmt: short");
+	cmp_ok($locale_en->date(\%myconfig, '20000229'), 'eq',
+		$result, "date, $fmt: chopped");
 	for my $mm (1 .. 12) {
 		my $start = $fmt;
 		my $temp = sprintf('%02d', $mm);
@@ -78,6 +81,7 @@
 }
 
 # $form->current_date checks
+# Note that $form->current_date always uses the database
 foreach my $format (0 .. $#formats) {
 	%myconfig = (dateformat => $formats[$format][0]);
 	my $fmt = $formats[$format][0];


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.