Changeset 5375
- Timestamp:
- 10/25/09 07:49:40 (2 years ago)
- Location:
- branches/Release01x00
- Files:
-
- 11 edited
-
MailerContrib/test/unit/MailerContrib/MailerContribSuite.pm (modified) (1 diff)
-
UnitTestContrib/lib/Unit/TestRunner.pm (modified) (3 diffs)
-
UnitTestContrib/test/unit/AccessControlTests.pm (modified) (1 diff)
-
UnitTestContrib/test/unit/ExceptionTests.pm (modified) (1 diff)
-
UnitTestContrib/test/unit/FoswikiTestCase.pm (modified) (1 diff)
-
UnitTestContrib/test/unit/RegisterTests.pm (modified) (1 diff)
-
WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorTests.pm (modified) (1 diff)
-
WysiwygPlugin/test/unit/WysiwygPlugin/WysiwygPluginTests.pm (modified) (3 diffs)
-
core/lib/Foswiki.pm (modified) (3 diffs)
-
core/lib/Foswiki/Prefs/PrefsCache.pm (modified) (2 diffs)
-
core/tools/extender.pl (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/Release01x00/MailerContrib/test/unit/MailerContrib/MailerContribSuite.pm
r5293 r5375 73 73 # Must create a new twiki to force re-registration of users 74 74 $Foswiki::cfg{EnableEmail} = 1; 75 $this->{twiki}->finish(); 75 76 $this->{twiki} = new Foswiki(); 76 77 $this->{twiki}->net->setMailHandler( \&FoswikiFnTestCase::sentMail ); -
branches/Release01x00/UnitTestContrib/lib/Unit/TestRunner.pm
r4912 r5375 5 5 use Devel::Symdump; 6 6 use Error qw(:try); 7 #use Devel::Leak::Object qw{ GLOBAL_bless }; 8 #$Devel::Leak::Object::TRACKSOURCELINES = 1; 7 9 8 10 sub new { … … 101 103 } 102 104 foreach my $test (@tests) { 105 #Devel::Leak::Object::checkpoint(); 103 106 print "\t$test\n"; 104 107 $tester->set_up(); … … 127 130 } 128 131 } 129 }132 } 130 133 131 134 if ( $this->{unexpected_failures} || $this->{unexpected_passes} ) { -
branches/Release01x00/UnitTestContrib/test/unit/AccessControlTests.pm
r3824 r5375 26 26 my $this = shift; 27 27 $this->SUPER::set_up(); 28 $this->{twiki} = new Foswiki();29 28 30 29 $currUser = $Foswiki::cfg{DefaultUserLogin}; -
branches/Release01x00/UnitTestContrib/test/unit/ExceptionTests.pm
r3005 r5375 108 108 $this->assert_matches(qr/^the rat$/m, $output); 109 109 $this->assert_matches(qr/^phlegm$/m, $output); 110 111 $session->finish(); 110 112 } 111 113 -
branches/Release01x00/UnitTestContrib/test/unit/FoswikiTestCase.pm
r3983 r5375 159 159 } 160 160 } 161 # undef $this->{twiki}; 161 162 } 162 163 -
branches/Release01x00/UnitTestContrib/test/unit/RegisterTests.pm
r3003 r5375 789 789 }); 790 790 $query->path_info( "/$this->{users_web}/UserRegistration" ); 791 $this->{twiki}->finish(); 791 792 $this->{twiki} = Foswiki->new($Foswiki::cfg{DefaultUserName}, $query); 792 793 $this->{twiki}->net->setMailHandler(\&FoswikiFnTestCase::sentMail); -
branches/Release01x00/WysiwygPlugin/test/unit/WysiwygPlugin/TranslatorTests.pm
r5358 r5375 2116 2116 } 2117 2117 $query->path_info("/Current/TestTopic"); 2118 $this->{session}->finish() if (defined($this->{session})); 2118 2119 $this->{session} = new Foswiki( undef, $query ); 2119 2120 $Foswiki::Plugins::SESSION = $this->{session}; -
branches/Release01x00/WysiwygPlugin/test/unit/WysiwygPlugin/WysiwygPluginTests.pm
r4939 r5375 94 94 $query->method('GET'); 95 95 96 $Foswiki::Plugins::SESSION = new Foswiki( 'guest', $query ); 96 $this->{twiki}->finish(); 97 $this->{twiki} = new Foswiki( 'guest', $query ); 98 $Foswiki::Plugins::SESSION = $this->{twiki}; 97 99 98 100 # charset definition affects output, so it is a response method and … … 174 176 $this->assert( $text eq $out, 175 177 "'" . anal($out) . "' !=\n'" . anal($text) . "'" ); 178 $foswiki->finish(); 176 179 } 177 180 … … 226 229 $this->assert_str_equals( $text, $out, 227 230 "'" . anal($out) . "' !=\n'" . anal($text) . "'" ); 231 $foswiki->finish(); 228 232 } 229 233 -
branches/Release01x00/core/lib/Foswiki.pm
r5296 r5375 1394 1394 $query ||= new Foswiki::Request(); 1395 1395 my $this = bless( { sandbox => 'Foswiki::Sandbox' }, $class ); 1396 1396 1397 $this->{request} = $query; 1397 1398 $this->{cgiQuery} = $query; # for backwards compatibility in contribs … … 1766 1767 =begin TML 1767 1768 1769 ---++ ObjectMethod DESTROY() 1770 1771 called by Perl when the Foswiki object goes out of scope 1772 (maybe should be used kist to ASSERT that finish() was called.. 1773 1774 =cut 1775 1776 #sub DESTROY { 1777 # my $this = shift; 1778 # $this->finish(); 1779 #} 1780 1781 =begin TML 1782 1768 1783 ---++ ObjectMethod finish() 1769 1784 Break circular references. … … 1779 1794 $_->finish() foreach values %{ $this->{forms} }; 1780 1795 $this->{plugins}->finish() if $this->{plugins}; 1796 undef $this->{plugins}; 1781 1797 $this->{users}->finish() if $this->{users}; 1798 undef $this->{users}; 1782 1799 $this->{prefs}->finish() if $this->{prefs}; 1800 undef $this->{prefs}; 1783 1801 $this->{templates}->finish() if $this->{templates}; 1802 undef $this->{templates}; 1784 1803 $this->{renderer}->finish() if $this->{renderer}; 1804 undef $this->{renderer}; 1785 1805 $this->{net}->finish() if $this->{net}; 1806 undef $this->{net}; 1786 1807 $this->{store}->finish() if $this->{store}; 1808 undef $this->{store}; 1787 1809 $this->{search}->finish() if $this->{search}; 1810 undef $this->{search}; 1788 1811 $this->{attach}->finish() if $this->{attach}; 1812 undef $this->{attach}; 1789 1813 $this->{security}->finish() if $this->{security}; 1814 undef $this->{security}; 1790 1815 $this->{i18n}->finish() if $this->{i18n}; 1791 1816 undef $this->{i18n}; 1817 #TODO: the logger doesn't seem to have a finish... 1818 # $this->{logger}->finish() if $this->{logger}; 1819 undef $this->{logger}; 1820 1792 1821 undef $this->{_HTMLHEADERS}; 1793 1822 undef $this->{request}; -
branches/Release01x00/core/lib/Foswiki/Prefs/PrefsCache.pm
r1779 r5375 32 32 require Foswiki::Prefs::Parser; 33 33 34 #SMELL: I don't know why this is a global - and where it should be undef'd.. 34 35 use vars qw( $parser ); 35 36 … … 175 176 } 176 177 177 my $parser= new Foswiki::Prefs::Parser();178 $parser ||= new Foswiki::Prefs::Parser(); 178 179 $parser->parseText( $meta->text(), $this, '' ); 179 180 $parser->parseMeta( $meta, $this, '' ); -
branches/Release01x00/core/tools/extender.pl
r5278 r5375 124 124 } 125 125 &$check_perl_module('CPAN'); 126 127 $session->finish(); 128 undef $session; 126 129 } 127 130
Note: See TracChangeset
for help on using the changeset viewer.
