1#!/usr/bin/perl
2
3use Apache::ASP::CGI::Test;
4
5use lib qw(t . ..);
6use T;
7use strict;
8
9my $t = T->new;
10my $r = Apache::ASP::CGI::Test->do_self
11    (
12     UseStrict => 1,
13     SessionQueryParse => 1,
14     Global => 'null',
15     );
16my $header = $r->test_header_out;
17my $body = $r->test_body_out;
18
19my @tests = (
20	     '<a href="/somelink.asp?test1=value1&amp;test2=value2&amp;session-id=',
21	     "<frame src='somelink.asp?test3=value3&amp;test4=value4&amp;session-id=",
22	     "<form action=/somelink.asp?test5=value5&amp;test6=value6&amp;session-id="
23	     );
24
25for my $test ( @tests ) {
26    $test =~ s/(\W)/\\$1/isg;
27    if($body =~ /$test/s) {
28	$t->ok;
29    } else {
30	$t->not_ok;
31    }
32}
33
34$t->done;
35
36__END__
37
38<a href="/somelink.asp?test1=value1&amp;test2=value2">Some Link</a>
39
40<frame src='<%= $Server->URL("somelink.asp?test3=value3", { test4 => "value4" }) %>'>
41
42<form action=/somelink.asp?test5=value5&test6=value6>
43