[Jifty-commit] r3806 - in Test-WWW-Declare: lib/Test/WWW

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Mon Aug 6 13:17:03 EDT 2007


Author: sartak
Date: Mon Aug  6 13:17:02 2007
New Revision: 3806

Modified:
   Test-WWW-Declare/   (props changed)
   Test-WWW-Declare/lib/Test/WWW/Declare.pm

Log:
 r29951 at caladan:  sartak | 2007-08-06 13:16:17 -0400
 fix error messages being reported negatively


Modified: Test-WWW-Declare/lib/Test/WWW/Declare.pm
==============================================================================
--- Test-WWW-Declare/lib/Test/WWW/Declare.pm	(original)
+++ Test-WWW-Declare/lib/Test/WWW/Declare.pm	Mon Aug  6 13:17:02 2007
@@ -165,8 +165,8 @@
     $args{negative} ||= 0;
 
     push @output, $args{name};
-    push @output, $args{positive} ? "does not"
-                                  : ();
+    push @output, $args{negative} ? ()
+                                  : "does not";
 
     if ($args{match} eq 'equality') {
         if ($args{case_insensitive}) {
@@ -175,8 +175,8 @@
             $args{expected} = lc $args{expected};
         }
 
-        push @output, $args{positive} ? "equal"
-                                      : "equals";
+        push @output, $args{negative} ? "equals"
+                                      : "equal";
         push @output, $orig->{expected};
 
         $match = $args{got} eq $args{expected};
@@ -188,8 +188,8 @@
             $args{expected} = lc $args{expected};
         }
 
-        push @output, $args{positive} ? "contain"
-                                      : "contains";
+        push @output, $args{negative} ? "contains"
+                                      : "contain";
         push @output, $orig->{expected};
 
         $match = index($args{got}, $args{expected}) >= 0;
@@ -201,8 +201,8 @@
             $args{expected} = "(?i:$args{expected})";
         }
 
-        push @output, $args{positive} ? "match"
-                                      : "matches";
+        push @output, $args{negative} ? "matches"
+                                      : "match";
         push @output, $orig->{expected};
 
         $match = $args{got} =~ $args{expected};


More information about the Jifty-commit mailing list