added test file for new file dealings, as well as get_template_files, get_image,...
[catagits/Catalyst-Devel.git] / t / check_testapp_the_same.t
1 use strict;
2 use warnings;
3
4 use FindBin qw/$Bin/;
5
6 use Test::More tests => 3;
7
8 ## find out where catalyst.pl is
9 my $cat = `which catalyst.pl`;
10 chomp($cat);
11
12 ## remove any existing test apps
13 is system("rm -rf $Bin/../TestAppForComparison"), 0 or BAIL_OUT;
14
15 ## create a new test app to compare to
16 is system("cd $Bin/../; $^X -I$Bin/../lib $cat TestAppForComparison"), 0 or BAIL_OUT;
17
18 SKIP: {
19  
20     my $diff;
21     eval {
22         $diff = `diff -urN -x .svn -x Changes $Bin/TestAppForComparison $Bin/../TestAppForComparison`;
23     };
24     
25     skip "no diff program installed, skipping", 1 if $@;
26     
27     ok !length($diff), 'Generated same TestApp', or warn($diff);
28     
29 }