4 use File::Temp qw/ tempdir tmpnam /;
8 my $dir = tempdir(CLEANUP => 1);
9 my $devnull = File::Spec->devnull;
17 if ($^O eq 'MSWin32') {
18 $exit = system("cd $dir & catalyst TestApp > $devnull 2>&1");
21 $exit = system("cd $dir; catalyst.pl TestApp > $devnull 2>&1");
23 is $exit, 0, 'Exit status ok';
26 chdir(File::Spec->catdir($dir, 'TestApp'));
27 lib->import(File::Spec->catdir($dir, 'TestApp', 'lib'));
33 lib/TestApp/Controller/Root.pm
39 root/static/images/catalyst_logo.png
40 root/static/images/btn_120x50_built.png
41 root/static/images/btn_120x50_built_shadow.png
42 root/static/images/btn_120x50_powered.png
43 root/static/images/btn_120x50_powered_shadow.png
44 root/static/images/btn_88x31_built.png
45 root/static/images/btn_88x31_built_shadow.png
46 root/static/images/btn_88x31_powered.png
47 root/static/images/btn_88x31_powered_shadow.png
51 script/testapp_fastcgi.pl
52 script/testapp_server.pl
53 script/testapp_test.pl
54 script/testapp_create.pl
57 foreach my $fn (@files) {
58 ok -r $fn, "Have $fn in generated app";
59 if ($fn =~ /script/) {
60 ok -x $fn, "$fn is executable";
65 my $makefile_status = `$^X Makefile.PL`;
66 ok $makefile_status, "Makefile ran okay";
67 ok -e "Makefile", "Makefile exists";
69 is system("make"), 0, 'Run make';
72 local $ENV{TEST_POD} = 1;
73 local $ENV{CATALYST_DEBUG} = 0;
74 foreach my $test (grep { m|^t/| } @files) {
75 subtest "Generated app test: $test", sub {
81 my $server_script = do {
82 open(my $fh, '<', 'script/testapp_server.pl') or die $!;
87 ok $server_script =~ qr/CATALYST_SCRIPT_GEN}\s+=\s+(\d+)/,
88 'SCRIPT_GEN found in generated output';
89 is $1, $Catalyst::Devel::CATALYST_SCRIPT_GEN, 'Script gen correct';