From: Crawford C. <cc...@c-...> - 2008-10-04 14:57:20
|
Hi Gilmar, Gilmar Santos Jr wrote: > Em Sex 03 Out 2008, Sven Dowideit escreveu: > >> Someone made changes to the table plugin a few days ago, and since then >> the unit tests have been failing. >> >> anyone want to own up to needing to fix something? >> > > I just fixed it. > > Since a while I'm working on "Item5911: Unit tests must work with trunk and > TWikiRelease04x02"[1] > > I think it's done: there is Unit::Request and Unit::Response classes, that > just work with trunk and older releases. Calls to "new CGI" must be replaced > by "new Unit::Request". charset method must be called after "new TWiki" > and "new Unit::Response" (before, it was called like $cgi->charset, and now > it must be called $response->charset). > > The main pourpose of this work is to ease plugin tests with different TWiki > releases. So, my question is: should I commit changes made to UnitTestContrib > to TWikiRelease04x02 AND all older releases? There is a little problem with > this approach: there are new core unit tests that will fail (they test new > features). But for the sole pourpose of testing plugins it will work. > Ah, this old problem. The requirement for single-branch extension development means we do extension development in the trunk only, and that in turn means we usually only run extension unit tests against the core in trunk. The obvious exception to this is the set of core extensions, which includes UnitTestContrib. These extensions must be testable against the core they are tagged with. That means the UnitTestContrib checked into TWikiRelease04x02 *must* run clean against 04x02. It would be unacceptable to introduce test failures to this code. So, either the tests of the new features has to be made conditional on the TWiki version, or the UnitTestContrib should be checked into the trunk *only*. I think you should check your UnitTestContrib changes in to trunk *only*. Of course for plugins outside the core set, unit tests may already have been recoded to use TWiki::Response. Those unit tests have to be fixed so that pass against 04x02. The obvious thing to do is to make sure they know about TWiki::Response and behave appropriately if it isn't there. e.g. if (require TWiki::Response) |{ $query = new Unit::Request({...}); } else { $query = new CGI({...}); } C. > I'm waiting for this decision to update Codev.TestCasesTutorial. > > Any suggestions? > > 1 - http://develop.twiki.org/~twiki4/cgi-bin/view/Bugs/Item5911 > > Gilmar > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > TWiki-Dev mailing list > TWi...@li... > https://lists.sourceforge.net/lists/listinfo/twiki-dev > > -- Crawford Currie - C-Dot Consultants http://c-dot.co.uk - A WikiRing Partner http://wikiring.com - landline: +44-1606-330-242 - mobile: +44-7837-877-956 - public key http://keyserver.veridis.com:11371/search?q=Crawford+Currie |