From 9c9da302f17e5266a14bcef5d056b644401ddc42 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 9 May 2008 18:14:14 +0000 Subject: [PATCH] remove colons from END blocks, so they actually act like END blocks --- t/Asset/Asset.t | 2 +- t/Config.t | 2 +- t/Help/isa.t | 2 +- t/International.t | 2 +- t/PassiveProfiling.t | 2 +- t/SQL.t | 2 +- t/Session/Icon.t | 2 +- t/Session/Var.t | 2 +- t/Shop/Address.t | 2 +- t/Shop/AddressBook.t | 2 +- t/Workflow/Activity/DeleteExpiredSessions.t | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/t/Asset/Asset.t b/t/Asset/Asset.t index c26cc38f8..754a27e21 100644 --- a/t/Asset/Asset.t +++ b/t/Asset/Asset.t @@ -701,7 +701,7 @@ diag $assetProps->{title}; isnt( $rootAsset->get('title'), $funkyTitle, 'get returns a safe copy of the Asset properties'); -END: { +END { $session->config->set( 'extrasURL', $origExtras); $session->config->set( 'uploadsURL', $origUploads); $session->setting->set('urlExtension', $origUrlExtension); diff --git a/t/Config.t b/t/Config.t index 3a343b93d..ddb087da0 100644 --- a/t/Config.t +++ b/t/Config.t @@ -86,6 +86,6 @@ if ($cookieName eq "") { $config->set('privateArray', ['a', 'b', 'c']); cmp_bag($config->get('privateArray'), ['a', 'b', 'c'], 'set: array, not scalar'); -END: { +END { $config->delete('privateArray'); } diff --git a/t/Help/isa.t b/t/Help/isa.t index b42ac358b..f06809e00 100644 --- a/t/Help/isa.t +++ b/t/Help/isa.t @@ -173,7 +173,7 @@ sub installCollateral { ); } -END: { +END { unlink File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI Help HelpTest.pm/); } diff --git a/t/International.t b/t/International.t index 68c2514aa..e1c2cf7ff 100644 --- a/t/International.t +++ b/t/International.t @@ -87,7 +87,7 @@ sub installPigLatin { ); } -END: { +END { unlink File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin WebGUI.pm/); unlink File::Spec->catfile(WebGUI::Test->lib, qw/WebGUI i18n PigLatin.pm/); rmdir File::Spec->catdir(WebGUI::Test->lib, qw/WebGUI i18n PigLatin/); diff --git a/t/PassiveProfiling.t b/t/PassiveProfiling.t index e05fb0f53..dd84bf510 100644 --- a/t/PassiveProfiling.t +++ b/t/PassiveProfiling.t @@ -121,7 +121,7 @@ cmp_bag( } -END: { +END { $session->setting->set('passiveProfilingEnabled', $origPassiveProfiling); $session->db->write('delete from passiveProfileLog where dateOfEntry >= ?',[$startingTime-1]); $versionTag->rollback; diff --git a/t/SQL.t b/t/SQL.t index 1a591e85a..1c39e93a0 100644 --- a/t/SQL.t +++ b/t/SQL.t @@ -285,6 +285,6 @@ cmp_deeply( 'Check table structure', ); -END: { +END { $session->db->dbh->do('DROP TABLE IF EXISTS testTable'); } diff --git a/t/Session/Icon.t b/t/Session/Icon.t index 8d5d9bcb7..7c0d47879 100644 --- a/t/Session/Icon.t +++ b/t/Session/Icon.t @@ -170,7 +170,7 @@ sub linkAndText { my $icon = $session->icon->drag(); -END: { +END { $session->user->profileField('toolbar', $origToolbar); } diff --git a/t/Session/Var.t b/t/Session/Var.t index 81170fdf3..9e49176d4 100644 --- a/t/Session/Var.t +++ b/t/Session/Var.t @@ -195,7 +195,7 @@ is($varTest->get('userId'), 3, 'userId set via start'); $varTest->start("", $varTest->getId); is($varTest->get('userId'), 1, 'calling start with null userId returns default user (visitor)'); -END: { +END { $session->env->{_env} = $origEnv; diff --git a/t/Shop/Address.t b/t/Shop/Address.t index 89a98d68d..08ff13fd3 100644 --- a/t/Shop/Address.t +++ b/t/Shop/Address.t @@ -243,7 +243,7 @@ is( $check, 0, 'delete worked'); } -END: { +END { $session->db->write('delete from addressBook'); $session->db->write('delete from address'); } diff --git a/t/Shop/AddressBook.t b/t/Shop/AddressBook.t index ff69bc647..9ecaeab90 100644 --- a/t/Shop/AddressBook.t +++ b/t/Shop/AddressBook.t @@ -209,7 +209,7 @@ undef $book; } -END: { +END { $session->db->write('delete from addressBook'); $session->db->write('delete from address'); } diff --git a/t/Workflow/Activity/DeleteExpiredSessions.t b/t/Workflow/Activity/DeleteExpiredSessions.t index 54c88ba43..480f4ca52 100644 --- a/t/Workflow/Activity/DeleteExpiredSessions.t +++ b/t/Workflow/Activity/DeleteExpiredSessions.t @@ -80,6 +80,6 @@ foreach my $testSession (@sessions) { ## Make sure that one scratch session was deleted and the other kept. ## Close and end all four sessions -END: { +END { $session->setting->set('sessionTimeout', $origSessionTimeout ); }