Permalink
Browse files

added simple test for mod_perl environment

  • Loading branch information...
1 parent 7e8e3a1 commit 6ac83312a8fb4a52f12592714afd24cdd419caed @dann committed Jan 10, 2009
View
@@ -81,7 +81,7 @@ requires 'FormValidator::Simple';
if (HAVE_MP) {
require Cwd;
Apache::TestMM::filter_args();
- Apache::TestMM::generate_script('t/integration/modperl/TEST');
+ Apache::TestMM::generate_script('t/TEST');
tests('t/integration/modperl/*.t');
} else {
tests('t/*.t t/unit/*.t t/unit/*/*.t');
View
4 t/TEST
@@ -1,10 +1,10 @@
#!/usr/bin/perl
# WARNING: this file is generated, do not edit
-# generated on Sat Jan 10 16:35:44 2009
+# generated on Sat Jan 10 20:44:02 2009
# 01: /usr/lib/perl5/Apache/TestConfig.pm:953
# 02: /usr/lib/perl5/Apache/TestConfig.pm:1043
# 03: /usr/lib/perl5/Apache/TestMM.pm:141
-# 04: Makefile.PL:80
+# 04: Makefile.PL:84
BEGIN { eval { require blib && blib->import; } }
use Apache::TestRunPerl;
@@ -1,6 +1,7 @@
HTTP::Router->define(
sub {
$_->match('/')->to( { controller => 'Root', action => 'index' } );
+ $_->match('/tt')->to( { controller => 'Root', action => 'view' } );
}
);
@@ -2,11 +2,18 @@ use strict;
use warnings;
use Apache::Test qw(ok :withtestmore);
use Apache::TestRequest qw(GET POST);
-use Test::More;
+use Angelos::Test;
plan skip_all => "set TEST_MODPERL to enable this test" unless $ENV{TEST_MODPERL};
plan tests => 1;
-my $res = GET '/';
-ok $res->code == 200, "Request is ok";
-#is $res->content, 'fuga';
+GET_ROOT: {
+ my $res = GET '/';
+ is $res->code, 200, "Request is ok";
+}
+
+#SHOW_WITH_TT: {
+# my $res = GET '/tt';
+# is $res->code, 200, "Request is ok";
+#}
+
@@ -0,0 +1,12 @@
+package Angelos::Test::InternalOnly;
+use Test::More;
+use strict;
+use warnings;
+
+sub import {
+ unless ( $ENV{ANGELOS_INTERNAL_TESTS} ) {
+ plan skip_all => "internal test only";
+ }
+}
+
+1;
View
@@ -1,3 +1,3 @@
#!/bin/sh
TEST_MODPERL=1 perl Makefile.PL
-TEST_MODPERL=1 make test
+TEST_MODPERL=1 TEST_STACK_TRACE=1 make test

0 comments on commit 6ac8331

Please sign in to comment.