Changeset 816 for trunk/UnitTestContrib/test/unit/FormattingTests.pm
- Timestamp:
- 11/19/08 19:11:33 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UnitTestContrib/test/unit/FormattingTests.pm
r766 r816 5 5 package FormattingTests; 6 6 7 use base qw( TWikiFnTestCase );8 9 use TWiki;7 use base qw( FoswikiFnTestCase ); 8 9 use Foswiki; 10 10 use Error qw( :try ); 11 11 … … 28 28 $this->{twiki}->{store}->saveTopic( 29 29 $this->{twiki}->{user}, $this->{test_web}, 30 $ TWiki::cfg{HomeTopicName}, "BLEEGLE");30 $Foswiki::cfg{HomeTopicName}, "BLEEGLE"); 31 31 $this->{twiki}->{store}->saveTopic( 32 32 $this->{twiki}->{user}, $this->{test_web}, 33 33 'Numeric1Wikiword', "BLEEGLE"); 34 $ TWiki::cfg{AntiSpam}{RobotsAreWelcome} = 1;35 $ TWiki::cfg{AntiSpam}{EmailPadding} = 'STUFFED';36 $ TWiki::cfg{AllowInlineScript} = 1;34 $Foswiki::cfg{AntiSpam}{RobotsAreWelcome} = 1; 35 $Foswiki::cfg{AntiSpam}{EmailPadding} = 'STUFFED'; 36 $Foswiki::cfg{AllowInlineScript} = 1; 37 37 } 38 38 … … 67 67 my $this = shift; 68 68 my $expected = <<EXPECTED; 69 <a class="twikiCurrentWebHomeLink twikiLink" href="$this->{sup}/$this->{test_web}/$ TWiki::cfg{HomeTopicName}">$TWiki::cfg{HomeTopicName}</a>70 EXPECTED 71 72 my $actual = <<ACTUAL; 73 $ TWiki::cfg{HomeTopicName}69 <a class="twikiCurrentWebHomeLink twikiLink" href="$this->{sup}/$this->{test_web}/$Foswiki::cfg{HomeTopicName}">$Foswiki::cfg{HomeTopicName}</a> 70 EXPECTED 71 72 my $actual = <<ACTUAL; 73 $Foswiki::cfg{HomeTopicName} 74 74 ACTUAL 75 75 $this->do_test($expected, $actual); … … 80 80 my $this = shift; 81 81 my $expected = <<EXPECTED; 82 <a class="twikiCurrentWebHomeLink twikiLink" href="$this->{sup}/$this->{test_web}/$ TWiki::cfg{HomeTopicName}">$TWiki::cfg{HomeTopicName}</a>83 EXPECTED 84 85 my $actual = <<ACTUAL; 86 [[$ TWiki::cfg{HomeTopicName}]]82 <a class="twikiCurrentWebHomeLink twikiLink" href="$this->{sup}/$this->{test_web}/$Foswiki::cfg{HomeTopicName}">$Foswiki::cfg{HomeTopicName}</a> 83 EXPECTED 84 85 my $actual = <<ACTUAL; 86 [[$Foswiki::cfg{HomeTopicName}]] 87 87 ACTUAL 88 88 $this->do_test($expected, $actual); … … 93 93 my $this = shift; 94 94 my $expected = <<EXPECTED; 95 <a class="twikiLink" href="$this->{sup}/$ TWiki::cfg{SystemWebName}/$TWiki::cfg{HomeTopicName}">$TWiki::cfg{SystemWebName}.$TWiki::cfg{HomeTopicName}</a>96 EXPECTED 97 98 my $actual = <<ACTUAL; 99 [[$ TWiki::cfg{SystemWebName}.$TWiki::cfg{HomeTopicName}]]95 <a class="twikiLink" href="$this->{sup}/$Foswiki::cfg{SystemWebName}/$Foswiki::cfg{HomeTopicName}">$Foswiki::cfg{SystemWebName}.$Foswiki::cfg{HomeTopicName}</a> 96 EXPECTED 97 98 my $actual = <<ACTUAL; 99 [[$Foswiki::cfg{SystemWebName}.$Foswiki::cfg{HomeTopicName}]] 100 100 ACTUAL 101 101 $this->do_test($expected, $actual); … … 106 106 my $this = shift; 107 107 my $expected = <<EXPECTED; 108 <a class="twikiLink" href="$this->{sup}/$ TWiki::cfg{SystemWebName}/$TWiki::cfg{HomeTopicName}">Alt <nop>TextAlt</a>109 EXPECTED 110 111 my $actual = <<ACTUAL; 112 [[$ TWiki::cfg{SystemWebName}.$TWiki::cfg{HomeTopicName}][Alt TextAlt]]108 <a class="twikiLink" href="$this->{sup}/$Foswiki::cfg{SystemWebName}/$Foswiki::cfg{HomeTopicName}">Alt <nop>TextAlt</a> 109 EXPECTED 110 111 my $actual = <<ACTUAL; 112 [[$Foswiki::cfg{SystemWebName}.$Foswiki::cfg{HomeTopicName}][Alt TextAlt]] 113 113 ACTUAL 114 114 $this->do_test($expected, $actual); … … 119 119 my $this = shift; 120 120 my $expected = <<EXPECTED; 121 <a href="$this->{sup}/$ TWiki::cfg{SystemWebName}/$TWiki::cfg{HomeTopicName}" target="_top">Alt <nop>TextAlt</a>122 EXPECTED 123 124 my $actual = <<ACTUAL; 125 [[$this->{sup}/$ TWiki::cfg{SystemWebName}/$TWiki::cfg{HomeTopicName} Alt TextAlt]]121 <a href="$this->{sup}/$Foswiki::cfg{SystemWebName}/$Foswiki::cfg{HomeTopicName}" target="_top">Alt <nop>TextAlt</a> 122 EXPECTED 123 124 my $actual = <<ACTUAL; 125 [[$this->{sup}/$Foswiki::cfg{SystemWebName}/$Foswiki::cfg{HomeTopicName} Alt TextAlt]] 126 126 ACTUAL 127 127 $this->do_test($expected, $actual); … … 131 131 my $this = shift; 132 132 my $expected = <<EXPECTED; 133 <nop>$ TWiki::cfg{HomeTopicName}134 EXPECTED 135 136 my $actual = <<ACTUAL; 137 !$ TWiki::cfg{HomeTopicName}133 <nop>$Foswiki::cfg{HomeTopicName} 134 EXPECTED 135 136 my $actual = <<ACTUAL; 137 !$Foswiki::cfg{HomeTopicName} 138 138 ACTUAL 139 139 $this->do_test($expected, $actual); … … 143 143 my $this = shift; 144 144 my $expected = <<EXPECTED; 145 [<nop>[$ TWiki::cfg{SystemWebName}.$TWiki::cfg{HomeTopicName}]]146 EXPECTED 147 148 my $actual = <<ACTUAL; 149 ![[$ TWiki::cfg{SystemWebName}.$TWiki::cfg{HomeTopicName}]]145 [<nop>[$Foswiki::cfg{SystemWebName}.$Foswiki::cfg{HomeTopicName}]] 146 EXPECTED 147 148 my $actual = <<ACTUAL; 149 ![[$Foswiki::cfg{SystemWebName}.$Foswiki::cfg{HomeTopicName}]] 150 150 ACTUAL 151 151 $this->do_test($expected, $actual); … … 155 155 my $this = shift; 156 156 my $expected = <<EXPECTED; 157 [<nop>[$this->{test_web}.$ TWiki::cfg{HomeTopicName}]]158 EXPECTED 159 160 my $actual = <<ACTUAL; 161 [<nop>[$this->{test_web}.$ TWiki::cfg{HomeTopicName}]]157 [<nop>[$this->{test_web}.$Foswiki::cfg{HomeTopicName}]] 158 EXPECTED 159 160 my $actual = <<ACTUAL; 161 [<nop>[$this->{test_web}.$Foswiki::cfg{HomeTopicName}]] 162 162 ACTUAL 163 163 $this->do_test($expected, $actual); … … 299 299 300 300 my $actual = <<ACTUAL; 301 [[ system.WebRss Base]]301 [[System.WebRss Base]] 302 302 ACTUAL 303 303 $this->do_test($expected, $actual); … … 535 535 sub test_Item3431a { 536 536 my $this = shift; 537 $ TWiki::cfg{AllowInlineScript} = 1;537 $Foswiki::cfg{AllowInlineScript} = 1; 538 538 my $expected = <<EXPECTED; 539 539 <script> … … 549 549 $this->do_test($expected, $actual); 550 550 551 $ TWiki::cfg{AllowInlineScript} = 0;551 $Foswiki::cfg{AllowInlineScript} = 0; 552 552 $expected = <<EXPECTED; 553 553 <!-- <script> is not allowed on this site --> … … 581 581 sub test_mailWithoutMailto { 582 582 my $this = shift; 583 $ TWiki::cfg{AntiSpam}{HideUserDetails} = 0;583 $Foswiki::cfg{AntiSpam}{HideUserDetails} = 0; 584 584 my $expected = <<EXPECTED; 585 585 <a href="mailto:pitiful\@exampleSTUFFED.com">mailto:pitiful\@exampleSTUFFED.com</a> … … 594 594 sub test_protocols { 595 595 my $this = shift; 596 $ TWiki::cfg{AntiSpam}{HideUserDetails} = 0;596 $Foswiki::cfg{AntiSpam}{HideUserDetails} = 0; 597 597 my %urls = ( 598 598 'file://fnurfle' => 0, … … 628 628 629 629 # mailto URL in double squabs 630 $ TWiki::cfg{AntiSpam}{HideUserDetails} = 0;630 $Foswiki::cfg{AntiSpam}{HideUserDetails} = 0; 631 631 my $expected = <<EXPECTED; 632 632 <a href="mailto:flip\@exampleSTUFFED.com">Oh smeg</a> … … 637 637 $this->do_test($expected, $actual); 638 638 639 $ TWiki::cfg{AntiSpam}{HideUserDetails} = 1;639 $Foswiki::cfg{AntiSpam}{HideUserDetails} = 1; 640 640 $expected = <<EXPECTED; 641 641 <a href="mailto:flip\@exampleSTUFFED.com">Oh smeg</a>
Note: See TracChangeset
for help on using the changeset viewer.
