Commit | Line | Data |
ad9d93fc |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use File::Temp qw/ tempdir /; |
0f89baa1 |
5 | use File::Spec; |
ad9d93fc |
6 | my $dir = tempdir(); # CLEANUP => 1 ); |
7 | |
8 | use Test::More; |
9 | { |
10 | # Check exit status here |
11 | system("cd $dir; catalyst.pl TestApp"); |
12 | } |
13 | # Fix paths / nl work on win32 |
14 | chdir("$dir/TestApp/"); |
15 | warn($dir); |
16 | |
17 | # Ok, this is lame.. Also, check +x permissions? |
18 | my @files = qw| |
19 | Makefile.PL |
2cb998f9 |
20 | testapp.conf |
21 | lib/TestApp.pm |
22 | lib/TestApp/Controller/Root.pm |
23 | README |
24 | Changes |
25 | t/01app.t |
26 | t/02pod.t |
27 | t/03podcoverage.t |
28 | root/static/images/catalyst_logo.png |
29 | root/static/images/btn_120x50_built.png |
30 | root/static/images/btn_120x50_built_shadow.png |
31 | root/static/images/btn_120x50_powered.png |
32 | root/static/images/btn_120x50_powered_shadow.png |
33 | root/static/images/btn_88x31_built.png |
34 | root/static/images/btn_88x31_built_shadow.png |
35 | root/static/images/btn_88x31_powered.png |
36 | root/static/images/btn_88x31_powered_shadow.png |
37 | root/favicon.ico |
38 | Makefile.PL |
39 | script/testapp_cgi.pl |
40 | script/testapp_fastcgi.pl |
41 | script/testapp_server.pl |
42 | script/testapp_test.pl |
43 | script/testapp_create.pl |
ad9d93fc |
44 | |; |
45 | |
20859489 |
46 | plan 'tests' => scalar @files + 3; |
ad9d93fc |
47 | |
48 | foreach my $fn (@files) { |
49 | ok -r $fn, "Have $fn in generated app"; |
50 | } |
51 | |
20859489 |
52 | ## Makefile stuff |
53 | my $makefile_status = `$^X Makefile.PL`; |
54 | ok $makefile_status, "Makefile ran okay"; |
55 | ok -e "Makefile", "Makefile exists"; |
56 | my $newapp_test_status = `prove -l t/`; |
57 | ok $newapp_test_status, "Tests ran okay"; |
58 | #is $newapp_test_status, ; |
59 | |
0f89baa1 |
60 | ## Moosey server tests |
61 | my $server_path = File::Spec->catfile('script', 'testapp_server.pl'); |
62 | #my $server_status = `$^X $server_path`; |
63 | #ok $server_status, "Moosey server starts ok"; |
64 | |