Return-Path: X-Original-To: apmail-httpd-cvs-archive@www.apache.org Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BCF421063C for ; Wed, 10 Jul 2013 16:25:55 +0000 (UTC) Received: (qmail 13650 invoked by uid 500); 10 Jul 2013 16:25:55 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 13507 invoked by uid 500); 10 Jul 2013 16:25:54 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 13500 invoked by uid 99); 10 Jul 2013 16:25:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 16:25:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 10 Jul 2013 16:25:51 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 19585238897A; Wed, 10 Jul 2013 16:25:31 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1501829 - in /httpd/test/framework/trunk/t: htdocs/modules/cgi/ htdocs/modules/cgi/unique-id.pl.PL modules/unique_id.t Date: Wed, 10 Jul 2013 16:25:30 -0000 To: cvs@httpd.apache.org From: jorton@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130710162531.19585238897A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jorton Date: Wed Jul 10 16:25:30 2013 New Revision: 1501829 URL: http://svn.apache.org/r1501829 Log: - add simple mod_unique_id test case Added: httpd/test/framework/trunk/t/htdocs/modules/cgi/unique-id.pl.PL httpd/test/framework/trunk/t/modules/unique_id.t Modified: httpd/test/framework/trunk/t/htdocs/modules/cgi/ (props changed) Propchange: httpd/test/framework/trunk/t/htdocs/modules/cgi/ ------------------------------------------------------------------------------ --- svn:ignore (original) +++ svn:ignore Wed Jul 10 16:25:30 2013 @@ -20,3 +20,5 @@ nph-dripfeed.pl nph-interim1.pl nph-interim2.pl redirect.pl +xother.pl +unique-id.pl Added: httpd/test/framework/trunk/t/htdocs/modules/cgi/unique-id.pl.PL URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/modules/cgi/unique-id.pl.PL?rev=1501829&view=auto ============================================================================== --- httpd/test/framework/trunk/t/htdocs/modules/cgi/unique-id.pl.PL (added) +++ httpd/test/framework/trunk/t/htdocs/modules/cgi/unique-id.pl.PL Wed Jul 10 16:25:30 2013 @@ -0,0 +1,3 @@ +print "Content-type: text/plain\n\n"; + +print $ENV{UNIQUE_ID}; Added: httpd/test/framework/trunk/t/modules/unique_id.t URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/unique_id.t?rev=1501829&view=auto ============================================================================== --- httpd/test/framework/trunk/t/modules/unique_id.t (added) +++ httpd/test/framework/trunk/t/modules/unique_id.t Wed Jul 10 16:25:30 2013 @@ -0,0 +1,27 @@ +use strict; +use warnings FATAL => 'all'; + +use Apache::Test; +use Apache::TestRequest; +use Apache::TestUtil; + +## +## mod_unique_id tests +## + +my $iters = 100; +my $url = "/modules/cgi/unique-id.pl"; +my %idx = (); + +plan tests => 3 * $iters, need need_cgi, need_module('unique_id'); + +foreach (1..$iters) { + my $r = GET $url; + ok t_cmp($r->code, 200, "fetch unique ID"); + my $v = $r->content; + print "# unique id: $v\n"; + chomp $v; + ok length($v) >= 20; + ok !exists($idx{$v}); + $idx{$v} = 1; +}