clean up old macroText statements

This commit is contained in:
Colin Kuskie 2006-07-29 03:50:34 +00:00
parent 84117932af
commit be6fc4b4f9
6 changed files with 6 additions and 36 deletions

View file

@ -34,7 +34,6 @@ my @testSets = (
comment => 'Visitor sees nothing',
userId => 1,
adminStatus => 'off',
macroText => q!^AdminToggle();!,
onText => q!!,
offText => q!!,
template => q!!,
@ -44,7 +43,6 @@ my @testSets = (
comment => 'Admin sees onText, default call',
userId => 3,
adminStatus => 'off',
macroText => q!^AdminToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -55,7 +53,6 @@ my @testSets = (
comment => 'Admin sees offText, default call',
userId => 3,
adminStatus => 'on',
macroText => q!^AdminToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -66,7 +63,6 @@ my @testSets = (
comment => 'Admin sees onText, custom text',
userId => 3,
adminStatus => 'off',
macroText => q!^AdminToggle("%s","%s");!,
onText => 'Admin powers... Activate!',
offText => 'Chillin, dude',
template => q!!,
@ -77,7 +73,6 @@ my @testSets = (
comment => 'Admin sees offText, custom text',
userId => 3,
adminStatus => 'on',
macroText => q!^AdminToggle("%s","%s");!,
onText => 'Admin powers... Activate!',
offText => 'Chillin, dude',
template => q!!,
@ -88,7 +83,6 @@ my @testSets = (
comment => 'Admin sees onText, custom text and template',
userId => 3,
adminStatus => 'off',
macroText => q!^AdminToggle("%s","%s","%s");!,
onText => 'Admin powers... Activate!',
offText => 'Chillin, dude',
template => $template->get('url'),
@ -99,7 +93,6 @@ my @testSets = (
comment => 'Admin sees offText, custom text and template',
userId => 3,
adminStatus => 'on',
macroText => q!^AdminToggle("%s","%s","%s");!,
onText => 'Admin powers... Activate!',
offText => 'Chillin, dude',
template => $template->get('url'),

View file

@ -21,9 +21,7 @@ use Data::Dumper;
use Test::More; # increment this value for each test you create
my $macroText = '^D("%s",%s);';
my $wgbday = 997966800;
my $output;
my @testSets = (
{

View file

@ -34,7 +34,6 @@ my @testSets = (
userId => 1,
adminStatus => 'off',
asset => $homeAsset,
macroText => q!^EditableToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -45,7 +44,6 @@ my @testSets = (
userId => 1,
adminStatus => 'on',
asset => $homeAsset,
macroText => q!^EditableToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -56,7 +54,6 @@ my @testSets = (
userId => 3,
adminStatus => 'off',
asset => $homeAsset,
macroText => q!^EditableToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -67,7 +64,6 @@ my @testSets = (
userId => 3,
adminStatus => 'on',
asset => $homeAsset,
macroText => q!^EditableToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -78,7 +74,6 @@ my @testSets = (
userId => 3,
adminStatus => 'off',
asset => $asset,
macroText => q!^EditableToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -89,7 +84,6 @@ my @testSets = (
userId => 3,
adminStatus => 'on',
asset => $asset,
macroText => q!^EditableToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -100,7 +94,6 @@ my @testSets = (
userId => $users[0]->userId,
adminStatus => 'off',
asset => $asset,
macroText => q!^EditableToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -111,7 +104,6 @@ my @testSets = (
userId => $users[0]->userId,
adminStatus => 'on',
asset => $asset,
macroText => q!^EditableToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -122,7 +114,6 @@ my @testSets = (
userId => $users[1]->userId,
adminStatus => 'off',
asset => $asset,
macroText => q!^EditableToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -133,7 +124,6 @@ my @testSets = (
userId => $users[1]->userId,
adminStatus => 'on',
asset => $asset,
macroText => q!^EditableToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -144,7 +134,6 @@ my @testSets = (
userId => $users[2]->userId,
adminStatus => 'off',
asset => $asset,
macroText => q!^EditableToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -155,7 +144,6 @@ my @testSets = (
userId => $users[2]->userId,
adminStatus => 'on',
asset => $asset,
macroText => q!^EditableToggle();!,
onText => $i18n->get(516),
offText => $i18n->get(517),
template => q!!,
@ -166,7 +154,6 @@ my @testSets = (
userId => $users[2]->userId,
adminStatus => 'off',
asset => $asset,
macroText => q!^EditableToggle("%s","%s");!,
onText => 'Admin powers... Activate!',
offText => 'Chillin, dude',
template => q!!,
@ -177,7 +164,6 @@ my @testSets = (
userId => $users[2]->userId,
adminStatus => 'on',
asset => $asset,
macroText => q!^EditableToggle("%s","%s");!,
onText => 'Admin powers... Activate!',
offText => 'Chillin, dude',
template => q!!,
@ -188,7 +174,6 @@ my @testSets = (
userId => $users[2]->userId,
adminStatus => 'on',
asset => $asset,
macroText => q!^EditableToggle("%s","%s","%s");!,
onText => 'Admin powers... Activate!',
offText => 'Chillin, dude',
template => $asset->get('url'),

View file

@ -23,7 +23,11 @@ use Test::More; # increment this value for each test you create
my $session = WebGUI::Test->session;
my $i18n = WebGUI::International->new($session, 'Macro_FileUrl');
##Add more Asset configurations here.
##Add more Asset configurations here. Each Asset is created and a reference
##is put into the "asset" key of the hash.
##The URL for the file the Asset contains is calculated and put
##in the "fileUrl" key of the hash.
my @testSets = (
{
comment => 'File Asset works with FileUrl',
@ -83,8 +87,6 @@ my @testSets = (
plan tests => scalar(@testSets) + 1;
my $macroText = '^FileUrl("%s");';
my $homeAsset = WebGUI::Asset->getDefault($session);
my $versionTag;
@ -100,8 +102,7 @@ foreach my $testSet (@testSets) {
}
}
my $output = sprintf $macroText, "non-existant-url";
WebGUI::Macro::process($session, \$output);
my $output = WebGUI::Macro::FileUrl::process($session, "non-existant-url");
is($output, $i18n->get('invalid url'), "Non-existant url returns error message");
sub setupTest {

View file

@ -21,9 +21,6 @@ use Test::More; # increment this value for each test you create
my $session = WebGUI::Test->session;
my $macroText = '^International("%s","%s");';
my $output;
my @testSets = (
{
input => ['macroName', 'Macro_International'],

View file

@ -25,25 +25,21 @@ my $session = WebGUI::Test->session;
my @testSets = (
{
comment => '5x5',
macroText => q!^Spacer("%s","%s");!,
width => 5,
height => 5,
},
{
comment => '10x3',
macroText => q!^Spacer("%s","%s");!,
width => 10,
height => 3,
},
{
comment => 'width only',
macroText => q!^Spacer("%s");!,
width => 11,
height => '',
},
{
comment => 'height only',
macroText => q!^Spacer("%s","%s");!,
width => '',
height => 7,
},