Return-Path: Delivered-To: apmail-modperl-cvs-archive@apache.org Received: (qmail 12771 invoked by uid 500); 19 May 2002 09:05:17 -0000 Mailing-List: contact modperl-cvs-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: dev@perl.apache.org Delivered-To: mailing list modperl-cvs@apache.org Received: (qmail 12760 invoked by uid 500); 19 May 2002 09:05:16 -0000 Delivered-To: apmail-modperl-2.0-cvs@apache.org Date: 19 May 2002 09:05:15 -0000 Message-ID: <20020519090515.5472.qmail@icarus.apache.org> From: stas@apache.org To: modperl-2.0-cvs@apache.org Subject: cvs commit: modperl-2.0/t/response/TestModperl dir_config.pm X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N stas 02/05/19 02:05:15 Modified: t/response/TestModperl dir_config.pm Log: - the last added sub-test was a duplicate, merge the two - make the debug comments more user-friendly Revision Changes Path 1.6 +13 -20 modperl-2.0/t/response/TestModperl/dir_config.pm Index: dir_config.pm =================================================================== RCS file: /home/cvs/modperl-2.0/t/response/TestModperl/dir_config.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- dir_config.pm 19 May 2002 08:55:54 -0000 1.5 +++ dir_config.pm 19 May 2002 09:05:15 -0000 1.6 @@ -16,7 +16,7 @@ sub handler { my $r = shift; - plan $r, tests => 14; + plan $r, tests => 13; #Apache::RequestRec::dir_config tests @@ -40,10 +40,11 @@ # sub-section inherits from super-section if it doesn't override it { - my $key = 'TestModperl__request_rec_Key_set_in_Base'; - ok t_cmp('BaseValue', $r->dir_config->get($key), - "sub-section inherits from super-section if" . - "it doesn't override it"); + my $key = make_key('_set_in_Base'); + ok t_cmp('BaseValue', + $r->dir_config($key), + "sub-section inherits from super-section " . + "if it doesn't override it"); } # sub-section overrides super-section for the same key @@ -60,13 +61,13 @@ # PerlSetVar key) ok t_cmp('SetValue0', $dir_config->get($key), - qq{\$dir_config->get("$key")}); + "table get() in a scalar context"); - # direct fetch test in a scalar context (for a single - # PerlSetVar) + # direct fetch test in a scalar context (for a single + # PerlSetVar key) ok t_cmp('SetValue0', $r->dir_config($key), - qq{\$r->dir_config("$key")}); + "direct value fetch in a scalar context"); } # test non-existent key @@ -75,7 +76,7 @@ ok t_cmp(undef, $r->dir_config($key), - qq{\$r->dir_config("$key")}); + "non-existent key"); } # test set interface @@ -87,7 +88,7 @@ ok t_cmp($val, $r->dir_config($key), - qq{\$r->dir_config($key => "$val")}); + "set && get"); } # test unset interface @@ -99,17 +100,9 @@ ok t_cmp(undef, $r->dir_config($key), - qq{\$r->dir_config($key => undef)}); + "unset"); } - # test PerlSetVar set in base config - { - my $key = make_key('_set_in_Base'); - - ok t_cmp("BaseValue", - $r->dir_config($key), - qq{\$r->dir_config("$key")}); - } #Apache::Server::dir_config tests