Permalink
Browse files

Added test for rfc2822() function.

  • Loading branch information...
1 parent e3856a0 commit b213c02e2015f419a871fbd62488195107b34c60 @supernovus committed Sep 14, 2010
Showing with 18 additions and 0 deletions.
  1. +18 −0 t/DateTime-rfc2822.t
View
18 t/DateTime-rfc2822.t
@@ -0,0 +1,18 @@
+use v6;
+use Test;
+
+BEGIN { @*INC.unshift: 'lib' }
+
+plan 1;
+
+use DateTime::Utils;
+
+# Try currently implemented strftime() formats
+my $g1 = DateTime.new(:year(1582), :month(10), :day(4),
+ :hour(13), :minute(2), :second(3.654321),
+ :timezone(-28800) );
+
+my $need = "Mon, 04 Oct 1582 13:02:03 -0800";
+
+is rfc2822($g1), $need, 'rfc2822 format'; # test 1
+

0 comments on commit b213c02

Please sign in to comment.