File: same_name.t

package info (click to toggle)
libapache-asp-perl 2.62-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 4,108 kB
  • ctags: 830
  • sloc: perl: 6,033; php: 417; sh: 65; lisp: 22; makefile: 10
file content (28 lines) | stat: -rw-r--r-- 674 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use Apache::ASP::CGI::Test;
use lib qw(t .);
use T;
use strict;
use Cwd qw(cwd);

$SIG{__DIE__} = \&Carp::confess;

my $t = T->new;
my $cwd = cwd();

for my $test_num (1..2) {
    chdir($cwd) || die("can't chdir to $cwd");
    my $r = Apache::ASP::CGI::Test->init($cwd.'/t/same_name/test'.$test_num.'/test.asp');
    my %config = (
		  NoState => 1,
		  GlobalPackage => 'SameName',
#		  Debug => -3,
		  );
    for(keys %config) { $r->dir_config->set($_, $config{$_}); }
    
    my $rv = Apache::ASP->handler($r);

    $t->eok($r->test_body_out eq $test_num, "test $test_num output is: ".$r->test_body_out.", return value: $rv");
}

$t->done;