You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by st...@apache.org on 2004/12/01 05:23:16 UTC
svn commit: r109277 - in httpd/test/trunk/perl-framework/Apache-Test: . t/cgi-bin t/conf
Author: stas
Date: Tue Nov 30 20:23:14 2004
New Revision: 109277
URL: http://svn.apache.org/viewcvs?view=rev&rev=109277
Log:
Add cookie jar tests
Contributed by: "Christopher H. Laco" <ap...@chrislaco.com>
Added:
httpd/test/trunk/perl-framework/Apache-Test/t/cgi-bin/
httpd/test/trunk/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL
Modified:
httpd/test/trunk/perl-framework/Apache-Test/Changes
httpd/test/trunk/perl-framework/Apache-Test/MANIFEST
httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL
httpd/test/trunk/perl-framework/Apache-Test/t/conf/extra.conf.in
Modified: httpd/test/trunk/perl-framework/Apache-Test/Changes
Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/Changes?view=diff&rev=109277&p1=httpd/test/trunk/perl-framework/Apache-Test/Changes&r1=109276&p2=httpd/test/trunk/perl-framework/Apache-Test/Changes&r2=109277
==============================================================================
--- httpd/test/trunk/perl-framework/Apache-Test/Changes (original)
+++ httpd/test/trunk/perl-framework/Apache-Test/Changes Tue Nov 30 20:23:14 2004
@@ -8,6 +8,9 @@
=item 1.17-dev
+Add cookie jar tests ["Christopher H. Laco" <apache-test
+chrislaco.com>]
+
Don't run interactive prompts when STDIN is closed [Stas]
Add LockFile directive in the autogenerated httpd.conf, which points
Modified: httpd/test/trunk/perl-framework/Apache-Test/MANIFEST
Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/MANIFEST?view=diff&rev=109277&p1=httpd/test/trunk/perl-framework/Apache-Test/MANIFEST&r1=109276&p2=httpd/test/trunk/perl-framework/Apache-Test/MANIFEST&r2=109277
==============================================================================
--- httpd/test/trunk/perl-framework/Apache-Test/MANIFEST (original)
+++ httpd/test/trunk/perl-framework/Apache-Test/MANIFEST Tue Nov 30 20:23:14 2004
@@ -41,6 +41,8 @@
t/TEST.PL
t/bad_coding.t
t/conf/extra.conf.in
+t/cookies.t
+t/cgi-bin/cookies.pl.PL
t/ping.t
t/redirect.t
t/request.t
Modified: httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL
Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL?view=diff&rev=109277&p1=httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL&r1=109276&p2=httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL&r2=109277
==============================================================================
--- httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL (original)
+++ httpd/test/trunk/perl-framework/Apache-Test/Makefile.PL Tue Nov 30 20:23:14 2004
@@ -12,6 +12,7 @@
use ExtUtils::MakeMaker;
use Symbol;
+use File::Find qw(finddepth);
use Apache::TestMM qw(test clean); #enable 'make test and make clean'
use Apache::TestRun;
@@ -26,6 +27,11 @@
Apache::TestMM::filter_args();
my @scripts = qw(t/TEST);
+
+finddepth(sub {
+ return unless /(.*?\.pl)\.PL$/;
+ push @scripts, "$File::Find::dir/$1";
+}, '.');
for (@scripts) {
Apache::TestMM::generate_script($_);
Added: httpd/test/trunk/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL
Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL?view=auto&rev=109277
==============================================================================
--- (empty file)
+++ httpd/test/trunk/perl-framework/Apache-Test/t/cgi-bin/cookies.pl.PL Tue Nov 30 20:23:14 2004
@@ -0,0 +1,16 @@
+#!perl -wT
+
+use strict;
+
+use CGI;
+use CGI::Cookie;
+
+my %cookies = CGI::Cookie->fetch;
+my $name = 'ApacheTest';
+my $c = ! exists $cookies{$name}
+ ? CGI::Cookie->new(-name=>$name, -value=>time)
+ : '';
+
+print "Set-Cookie: $c\n" if $c;
+print "Content-Type: text/plain\n\n";
+print ($c ? 'new' : 'exists'), "\n";
Modified: httpd/test/trunk/perl-framework/Apache-Test/t/conf/extra.conf.in
Url: http://svn.apache.org/viewcvs/httpd/test/trunk/perl-framework/Apache-Test/t/conf/extra.conf.in?view=diff&rev=109277&p1=httpd/test/trunk/perl-framework/Apache-Test/t/conf/extra.conf.in&r1=109276&p2=httpd/test/trunk/perl-framework/Apache-Test/t/conf/extra.conf.in&r2=109277
==============================================================================
--- httpd/test/trunk/perl-framework/Apache-Test/t/conf/extra.conf.in (original)
+++ httpd/test/trunk/perl-framework/Apache-Test/t/conf/extra.conf.in Tue Nov 30 20:23:14 2004
@@ -32,3 +32,14 @@
</IfModule>
+<IfModule mod_cgi.c>
+ ScriptAlias /cgi-bin/ "@ServerRoot@/cgi-bin/"
+
+ <Directory "@ServerRoot@/cgi-bin/">
+ AllowOverride None
+ Options +ExecCGI
+ Order allow,deny
+ Allow from all
+ </Directory>
+</IfModule>
+