Changeset 816 for trunk/UnitTestContrib/test/unit/Fn_REVINFO.pm
- Timestamp:
- 11/19/08 19:11:33 (4 years ago)
- File:
-
- 1 edited
-
trunk/UnitTestContrib/test/unit/Fn_REVINFO.pm (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/UnitTestContrib/test/unit/Fn_REVINFO.pm
r666 r816 4 4 5 5 package Fn_REVINFO; 6 use base qw( TWikiFnTestCase );6 use base qw( FoswikiFnTestCase ); 7 7 8 8 use strict; 9 use TWiki;9 use Foswiki; 10 10 use Error qw( :try ); 11 11 12 12 sub new { 13 $ TWiki::cfg{Register}{AllowLoginName} = 1;13 $Foswiki::cfg{Register}{AllowLoginName} = 1; 14 14 my $self = shift()->SUPER::new('REVINFO', @_); 15 15 return $self; … … 33 33 my $ui = $this->{twiki}->handleCommonTags( 34 34 '%REVINFO%', $this->{test_web}, $this->{test_topic}); 35 my $guest = TWiki::Func::getWikiName();35 my $guest = Foswiki::Func::getWikiName(); 36 36 unless ($ui =~ /^r1 - \d+ \w+ \d+ - \d+:\d+:\d+ - $this->{users_web}\.$guest$/) { 37 37 $this->assert(0, $ui); … … 126 126 # This test is specific to the "traditional" text database implementation, 127 127 # either RcsWrap or RcsLite. 128 if ($ TWiki::cfg{StoreImpl} ne 'RcsLite' &&129 $ TWiki::cfg{StoreImpl} ne 'RcsWrap') {128 if ($Foswiki::cfg{StoreImpl} ne 'RcsLite' && 129 $Foswiki::cfg{StoreImpl} ne 'RcsWrap') { 130 130 return; 131 131 } 132 132 $this->assert(open( 133 F, '>', "$ TWiki::cfg{DataDir}/$this->{test_web}/CrikeyMoses.txt"));133 F, '>', "$Foswiki::cfg{DataDir}/$this->{test_web}/CrikeyMoses.txt")); 134 134 print F <<'HERE'; 135 135 %META:TOPICINFO{author="ScumBag" date="1120846368" format="1.1" version="$Rev: 16686 $"}% … … 149 149 # This test is specific to the "traditional" text database implementation, 150 150 # either RcsWrap or RcsLite. 151 if ($ TWiki::cfg{StoreImpl} ne 'RcsLite' &&152 $ TWiki::cfg{StoreImpl} ne 'RcsWrap') {151 if ($Foswiki::cfg{StoreImpl} ne 'RcsLite' && 152 $Foswiki::cfg{StoreImpl} ne 'RcsWrap') { 153 153 return; 154 154 } 155 155 $this->assert(open( 156 F, '>', "$ TWiki::cfg{DataDir}/$this->{test_web}/CrikeyMoses.txt"));156 F, '>', "$Foswiki::cfg{DataDir}/$this->{test_web}/CrikeyMoses.txt")); 157 157 print F <<'HERE'; 158 158 %META:TOPICINFO{author="scum" date="1120846368" format="1.1" version="$Rev: 16686 $"}% … … 172 172 # This test is specific to the "traditional" text database implementation, 173 173 # either RcsWrap or RcsLite. 174 if ($ TWiki::cfg{StoreImpl} ne 'RcsLite' &&175 $ TWiki::cfg{StoreImpl} ne 'RcsWrap') {174 if ($Foswiki::cfg{StoreImpl} ne 'RcsLite' && 175 $Foswiki::cfg{StoreImpl} ne 'RcsWrap') { 176 176 return; 177 177 } 178 178 $this->assert(open( 179 F, '>', "$ TWiki::cfg{DataDir}/$this->{test_web}/GeeWillikins.txt"));179 F, '>', "$Foswiki::cfg{DataDir}/$this->{test_web}/GeeWillikins.txt")); 180 180 print F <<'HERE'; 181 181 %META:TOPICINFO{author="eltonjohn" date="1120846368" format="1.1" version="$Rev: 16686 $"}% 182 182 HERE 183 183 close(F); 184 $ TWiki::cfg{RenderLoggedInButUnknownUsers} = 0;184 $Foswiki::cfg{RenderLoggedInButUnknownUsers} = 0; 185 185 my $ui = $this->{twiki}->handleCommonTags( 186 186 '%REVINFO{format="$username $wikiname $wikiusername"}%', 187 187 $this->{test_web}, 'GeeWillikins'); 188 188 $this->assert_str_equals("eltonjohn eltonjohn eltonjohn", $ui); 189 $ TWiki::cfg{RenderLoggedInButUnknownUsers} = 1;189 $Foswiki::cfg{RenderLoggedInButUnknownUsers} = 1; 190 190 $ui = $this->{twiki}->handleCommonTags( 191 191 '%REVINFO{format="$username $wikiname $wikiusername"}%',
Note: See TracChangeset
for help on using the changeset viewer.
