fixed apptest.tt per #PXVL (hiveminder)
[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 my $diff;
19 eval {
20     $diff = `diff -urNB -x .svn -x Changes $Bin/TestAppForComparison $Bin/../TestAppForComparison`;
21 };
22     
23 skip "no diff program installed, skipping", 1 if $@;
24   
25 ok !length($diff), 'Generated same TestApp', or warn($diff);