[prev in list] [next in list] [prev in thread] [next in thread]
List: mason-cvs
Subject: [Mason-checkins] CVS: mason/dist/t 04-misc.t,1.25,1.26
From: Jonathan Swartz <jswartz () users ! sourceforge ! net>
Date: 2004-12-09 20:38:08
Message-ID: E1CcV3A-0007p8-PL () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]
Update of /cvsroot/mason/mason/dist/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30049/dist/t
Modified Files:
04-misc.t
Log Message:
Fix ->decline from /dhandler entering infinite loop (task id #573)
Index: 04-misc.t
===================================================================
RCS file: /cvsroot/mason/mason/dist/t/04-misc.t,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- 04-misc.t 12 Oct 2004 18:20:39 -0000 1.25
+++ 04-misc.t 9 Dec 2004 20:38:06 -0000 1.26
@@ -264,11 +264,16 @@
#------------------------------------------------------------
- # this is sneaky and bad!
+ # define /dhandler that sometimes declines. test framework should provide a
+ # more supported way to define a top-level component!
my $updir = File::Spec->updir;
$group->add_support( path => "$updir/dhandler",
component => <<'EOF',
-top-level dhandler
+% if ($m->request_args->{decline_from_top}) {
+% $m->decline;
+% } else {
+top-level dhandler: path = <% $m->current_comp->path %>
+% }
EOF
);
@@ -282,7 +287,7 @@
#------------------------------------------------------------
- $group->add_test( name => 'top_level_dhandler',
+ $group->add_test( name => 'top_level_dhandler_handles',
description => 'make sure dhandler at /dhandler is called correctly after \
decline from lower-level dhandler', path => '/notused',
call_path => '/nonexistent',
@@ -290,11 +295,24 @@
not ever used
EOF
expect => <<'EOF',
-top-level dhandler
+top-level dhandler: path = /dhandler
EOF
);
#------------------------------------------------------------
+ $group->add_test( name => 'top_level_dhandler_declines',
+ description => 'make sure /dhandler decline results in not-found error',
+ path => '/notused2',
+ call_path => '/nonexistent',
+ call_args => { decline_from_top => 1 },
+ component => <<'EOF',
+not ever used
+EOF
+ expect_error => qr/could not find component for initial path/,
+ );
+
+#------------------------------------------------------------
+
return $group;
}
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Mason-checkins mailing list
Mason-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-checkins
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic