Hi, On Mon, Jan 7, 2013 at 11:47 PM, Oliver Paukstadt <pst...@sourcentral.org> wrote: > On Mon, 2013-01-07 at 17:34 +0000, Pedro Melo wrote: >> https://github.com/jonswar/perl-mason/pull/16#commits-pushed-bdd2292 >> >> Docs, tests and code. It should fix all reported problems, and the >> behaviour is actually much saner than before. >> >> Comments? >> > I think there are some testcases missing about resolving order: > $try->( '/news/sports', ['/news/sports/index','/news/sports.mc'], > '/news/sports.mc', ''); > $try->( '/news/sports/', ['/news/sports/index','/news/sports.mc'], > '/news/sports/index', ''); > $try->( '/news/sports/', ['/news/sports/index=1','/news/sports.mc'], > '/news/sports/index', '/'); > > This is what I expect of resolving order when I read the new docs. > The 2nd and 3rd test fail and return /news/sports.mc with latest code. > > Same for dhandler: 2nd test fails: > $try->( '/news/sports', ['/news/sports/dhandler','/news/sports.mc'], > '/news/sports.mc', ''); > $try->( '/news/sports/', ['/news/sports/dhandler','/news/sports.mc'], > '/news/sports/dhandler', '/'); > > As far as I can see, if we have $trailing_slash eq "/" we need to switch > order of autoextensions and index/dhandler block while building > candidate_paths. > I added some more tests to make sure nothing is broken and get better > coverage: > $try->( '/news/sports', ['/news/dhandler','/news/sports.mc'], > '/news/sports.mc', ''); > $try->( '/news/sports/', ['/news/dhandler','/news/sports.mc'], > '/news/sports.mc', ''); > $try->( '/news/sports/', ['/news/dhandler','/news/sports.mc=1'], > '/news/sports.mc', '/'); > $try->( '/news/sports', ['/dhandler','/news.mc'], '/dhandler', 'news/sports'); > $try->( '/news/sports/', ['/dhandler','/news.mc'], '/dhandler', > 'news/sports/'); > $try->( '/news/sports/', ['/dhandler','/news.mc=1'], '/news.mc', 'sports/'); > > Please check all tests against the documentation. > Patch for tests and proposed fix added.
Ok, I'll apply the patches, and update the docs if needed. I'll update the PR shortly. Bye, -- Pedro Melo @pedromelo http://www.simplicidade.org/ http://about.me/melo xmpp:m...@simplicidade.org mailto:m...@simplicidade.org ------------------------------------------------------------------------------ Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS and more. Get SQL Server skills now (including 2012) with LearnDevNow - 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. SALE $99.99 this month only - learn more at: http://p.sf.net/sfu/learnmore_122512 _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users