[Catalyst-commits] r10310 - Catalyst-Devel/1.00/branches/helper_refactor/t

dhoss at dev.catalyst.perl.org dhoss at dev.catalyst.perl.org
Wed May 27 08:33:18 GMT 2009


Author: dhoss
Date: 2009-05-27 08:33:17 +0000 (Wed, 27 May 2009)
New Revision: 10310

Modified:
   Catalyst-Devel/1.00/branches/helper_refactor/t/check_testapp_the_same.t
Log:
Fixed up test to check to see if user has a diff program installed

Modified: Catalyst-Devel/1.00/branches/helper_refactor/t/check_testapp_the_same.t
===================================================================
--- Catalyst-Devel/1.00/branches/helper_refactor/t/check_testapp_the_same.t	2009-05-27 06:25:38 UTC (rev 10309)
+++ Catalyst-Devel/1.00/branches/helper_refactor/t/check_testapp_the_same.t	2009-05-27 08:33:17 UTC (rev 10310)
@@ -5,11 +5,25 @@
 
 use Test::More tests => 3;
 
+## find out where catalyst.pl is
 my $cat = `which catalyst.pl`;
 chomp($cat);
+
+## remove any existing test apps
 is system("rm -rf $Bin/../TestAppForComparison"), 0 or BAIL_OUT;
-is system("cd $Bin/../; $^X -I $Bin/../lib $cat TestAppForComparison"), 0 or BAIL_OUT;
-my $diff = `diff -urN -x .svn -x Changes $Bin/TestAppForComparison $Bin/../TestAppForComparison`;
-ok !length($diff), 'Generated same TestApp',
-    or warn($diff);
 
+## create a new test app to compare to
+is system("cd $Bin/../; $^X -I$Bin/../lib $cat TestAppForComparison"), 0 or BAIL_OUT;
+
+SKIP: {
+ 
+    my $diff;
+    eval {
+        $diff = `diff -urN -x .svn -x Changes $Bin/TestAppForComparison $Bin/../TestAppForComparison`;
+    };
+    
+    skip "no diff program installed, skipping", 1 if $@;
+    
+    ok !length($diff), 'Generated same TestApp', or warn($diff);
+    
+}




More information about the Catalyst-commits mailing list