first round at fixing tests to work with new session system
This commit is contained in:
parent
a3adaee3a0
commit
20a4aebb13
15 changed files with 160 additions and 161 deletions
|
|
@ -12,7 +12,6 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Form::FieldType;
|
||||
use WebGUI::Form::DynamicField;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
|
@ -27,7 +26,7 @@ use Test::More; # increment this value for each test you create
|
|||
|
||||
my $numTests = 0;
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
# put your tests here
|
||||
|
||||
|
|
@ -57,21 +56,22 @@ my $name = WebGUI::Form::DynamicField->getName();
|
|||
|
||||
ok($name, 'did not inherit default form name');
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Form::DynamicField;
|
||||
use WebGUI::Form::SelectList;
|
||||
use Data::Dumper;
|
||||
|
|
@ -33,7 +32,7 @@ use Test::More; # increment this value for each test you create
|
|||
# compare output of toHtmlWithWrapper from both objects
|
||||
my $numTests = 8*14;
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
# put your tests here
|
||||
|
||||
|
|
@ -409,21 +408,22 @@ is($dynamic->toHtmlAsHidden, $direct->toHtmlAsHidden, "matching DatabaseLink out
|
|||
|
||||
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
27
t/Id.t
27
t/Id.t
|
|
@ -12,45 +12,44 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
|
||||
use Test::More tests => 2; # increment this value for each test you create
|
||||
use WebGUI::Id;
|
||||
use WebGUI::Utility;
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
# generate
|
||||
my $generateId = WebGUI::Id::generate();
|
||||
my $generateId = $session->id->generate();
|
||||
is(length($generateId), 22, "generate() - length of 22 characters");
|
||||
my @uniqueIds;
|
||||
my $isUnique = 1;
|
||||
for (1..2000) {
|
||||
last unless $isUnique;
|
||||
my $id = WebGUI::Id::generate();
|
||||
my $id = $session->id->generate();
|
||||
$isUnique = !isIn($id,@uniqueIds);
|
||||
push(@uniqueIds,$id);
|
||||
}
|
||||
ok($isUnique, "generate() - unique");
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
22
t/Macro.t
22
t/Macro.t
|
|
@ -12,13 +12,12 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::SQL;
|
||||
use Data::Dumper;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
#This test is to verify bugs with respect to Macros:
|
||||
# - [ 1364838 ] ^GroupText Macro cannot execute other macros
|
||||
|
|
@ -103,21 +102,22 @@ foreach my $macro ( @settingMacros ) {
|
|||
|
||||
$sth->finish();
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
22
t/POD.t
22
t/POD.t
|
|
@ -14,13 +14,12 @@ use lib '../lib';
|
|||
use Getopt::Long;
|
||||
use Pod::Coverage;
|
||||
use File::Find;
|
||||
use WebGUI::Session;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
|
||||
use Test::More;
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
my @modules = ();
|
||||
find(\&countModules, "../lib/WebGUI");
|
||||
|
|
@ -32,7 +31,7 @@ foreach my $package (sort @modules) {
|
|||
ok($pc->coverage, $package);
|
||||
}
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
sub countModules {
|
||||
my $filename = $File::Find::dir."/".$_;
|
||||
|
|
@ -50,16 +49,17 @@ sub countModules {
|
|||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
24
t/SQL.t
24
t/SQL.t
|
|
@ -12,7 +12,6 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use Data::Dumper;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
|
|
@ -20,7 +19,7 @@ use Data::Dumper;
|
|||
use Test::More tests => 33; # increment this value for each test you create
|
||||
use WebGUI::SQL;
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
# read
|
||||
ok(my $sth = WebGUI::SQL->read("select * from settings"), "read()");
|
||||
|
|
@ -149,22 +148,23 @@ is($getRow->{nextValue}, 47, "getRow()");
|
|||
WebGUI::SQL->write("delete from incrementer where incrementerId=".quote($setRowId));
|
||||
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
nitialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
22
t/User.t
22
t/User.t
|
|
@ -12,7 +12,6 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Utility;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
|
|
@ -20,7 +19,7 @@ use WebGUI::User;
|
|||
use WebGUI::SQL;
|
||||
use Test::More tests => 33; # increment this value for each test you create
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
# put your tests here
|
||||
my $user;
|
||||
|
|
@ -152,22 +151,23 @@ SKIP: {
|
|||
ok(undef, "uncache");
|
||||
}
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
13
t/Utility.t
13
t/Utility.t
|
|
@ -13,12 +13,11 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
use Test::More tests => 21; # increment this value for each test you create
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
|
||||
# commify
|
||||
|
|
@ -88,23 +87,23 @@ SKIP: {
|
|||
}
|
||||
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
#-------------------------------------------------------------------
|
||||
# WebGUI is Copyright 2001-2005 Plain Black Corporation.
|
||||
# WebGUI is Copyright 2001-2006 Plain Black Corporation.
|
||||
#-------------------------------------------------------------------
|
||||
# Please read the legal notices (docs/legal.txt) and the license
|
||||
# (docs/license.txt) that came with this distribution before using
|
||||
|
|
@ -12,17 +12,16 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
|
||||
use Test::More tests => 1; # increment this value for each test you create
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
# put your tests here
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
|
@ -34,10 +33,11 @@ sub initialize {
|
|||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Operation::Help;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
|
|
@ -24,7 +23,7 @@ use WebGUI::Operation::Help;
|
|||
use Test::More;
|
||||
my $numTests = 0;
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
my @helpFileSet = WebGUI::Operation::Help::_getHelpFilesList();
|
||||
|
||||
|
|
@ -42,22 +41,23 @@ foreach my $helpSet (@helpFileSet) {
|
|||
|
||||
# put your tests here
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Operation::Help;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
|
|
@ -24,7 +23,7 @@ use WebGUI::Operation::Help;
|
|||
use Test::More;
|
||||
my $numTests = 0;
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
my @helpFileSet = WebGUI::Operation::Help::_getHelpFilesList();
|
||||
|
||||
|
|
@ -64,22 +63,24 @@ foreach my $related (@relatedHelp) {
|
|||
|
||||
# put your tests here
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
22
t/help_toc.t
22
t/help_toc.t
|
|
@ -12,7 +12,6 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Operation::Help;
|
||||
use WebGUI::International;
|
||||
use Data::Dumper;
|
||||
|
|
@ -25,7 +24,7 @@ use File::Find;
|
|||
use Test::More; # increment this value for each test you create
|
||||
my $numTests = 0;
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
my @helpFileSet = WebGUI::Operation::Help::_getHelpFilesList();
|
||||
|
||||
|
|
@ -42,21 +41,22 @@ foreach my $fileSet (@helpFileSet) {
|
|||
ok(WebGUI::Operation::Help::_getHelpName($file), "Missing label for $file");
|
||||
}
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
22
t/i18n.t
22
t/i18n.t
|
|
@ -13,7 +13,6 @@ use strict;
|
|||
use lib '../lib';
|
||||
use Text::Balanced qw(extract_codeblock);
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Operation::Help;
|
||||
use WebGUI::International;
|
||||
use Data::Dumper;
|
||||
|
|
@ -26,7 +25,7 @@ use File::Find;
|
|||
use Test::More; # increment this value for each test you create
|
||||
my $numTests = 0;
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
# put your tests here
|
||||
|
||||
|
|
@ -118,7 +117,7 @@ foreach my $i18n ( @objLabels ) {
|
|||
sprintf "label: %s->%s inside %s", @{ $i18n }{'namespace', 'label', 'file', });
|
||||
}
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
sub label_finder_pm {
|
||||
next unless /\.pm$/;
|
||||
|
|
@ -228,16 +227,17 @@ sub getSQLLabels {
|
|||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Asset;
|
||||
use File::Find;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
|
@ -178,7 +177,7 @@ my @tmplVarTable = (
|
|||
use Test::More; # increment this value for each test you create
|
||||
my $numTests = 0;
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
my @varTypes = qw( var loop if );
|
||||
|
||||
|
|
@ -213,21 +212,22 @@ foreach my $tmpl ( @tmplVarTable ) {
|
|||
}
|
||||
}
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
nitialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,6 @@
|
|||
use strict;
|
||||
use lib '../lib';
|
||||
use Getopt::Long;
|
||||
use WebGUI::Session;
|
||||
use File::Find;
|
||||
# ---- END DO NOT EDIT ----
|
||||
|
||||
|
|
@ -34,11 +33,11 @@ foreach my $package (@modules) {
|
|||
is($returnVal, 0, "syntax check for $package");
|
||||
}
|
||||
|
||||
initialize(); # this line is required
|
||||
my $session = initialize(); # this line is required
|
||||
|
||||
# put your tests here
|
||||
|
||||
cleanup(); # this line is required
|
||||
cleanup($session); # this line is required
|
||||
|
||||
#----------------------------------------
|
||||
sub getWebGUIModules {
|
||||
|
|
@ -49,16 +48,17 @@ sub getWebGUIModules {
|
|||
# ---- DO NOT EDIT BELOW THIS LINE -----
|
||||
|
||||
sub initialize {
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
WebGUI::Session::open("..",$configFile);
|
||||
$|=1; # disable output buffering
|
||||
my $configFile;
|
||||
GetOptions(
|
||||
'configFile=s'=>\$configFile
|
||||
);
|
||||
exit 1 unless ($configFile);
|
||||
my $session = WebGUI::Session->open("..",$configFile);
|
||||
}
|
||||
|
||||
sub cleanup {
|
||||
WebGUI::Session::close();
|
||||
my $session = shift;
|
||||
$session->close();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue