Browse Source

test: Move use strict and warnings as the first directives

Guillem Jover 9 years ago
parent
commit
061c572fda

+ 2 - 2
scripts/t/Dpkg_Arch.t

@@ -13,11 +13,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-use Test::More tests => 42;
-
 use strict;
 use warnings;
 
+use Test::More tests => 42;
+
 use_ok('Dpkg::Arch', qw(debarch_to_debtriplet debarch_to_multiarch
                         debarch_eq debarch_is debarch_is_wildcard));
 

+ 1 - 0
scripts/t/Dpkg_BuildOptions.t

@@ -17,6 +17,7 @@ use strict;
 use warnings;
 
 use Test::More tests => 24;
+
 use Dpkg::ErrorHandling;
 
 use_ok('Dpkg::BuildOptions');

+ 1 - 0
scripts/t/Dpkg_Changelog.t

@@ -19,6 +19,7 @@ use warnings;
 use Test::More tests => 84;
 
 use File::Basename;
+
 use Dpkg::File;
 
 BEGIN {

+ 1 - 0
scripts/t/Dpkg_Deps.t

@@ -17,6 +17,7 @@ use strict;
 use warnings;
 
 use Test::More tests => 45;
+
 use Dpkg::Arch qw(get_host_arch);
 use Dpkg::Version;
 

+ 1 - 0
scripts/t/Dpkg_IPC.t

@@ -17,6 +17,7 @@ use strict;
 use warnings;
 
 use Test::More tests => 8;
+
 use File::Temp qw(tempfile);
 
 use_ok('Dpkg::IPC');

+ 2 - 2
scripts/t/Dpkg_Substvars.t

@@ -13,11 +13,11 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-use Test::More tests => 32;
-
 use strict;
 use warnings;
 
+use Test::More tests => 32;
+
 use Dpkg ();
 use Dpkg::Arch qw(get_host_arch);
 

+ 1 - 0
scripts/t/Dpkg_Version.t

@@ -17,6 +17,7 @@ use strict;
 use warnings;
 
 use Test::More;
+
 use Dpkg::ErrorHandling;
 
 report_options(quiet_warnings => 1);

+ 2 - 1
scripts/t/merge_changelogs.t

@@ -18,11 +18,12 @@ use warnings;
 
 use Test::More tests => 3;
 
-use Dpkg::IPC;
 use File::Spec;
 use File::Compare;
 use File::Temp;
 
+use Dpkg::IPC;
+
 my $srcdir = $ENV{srcdir} || '.';
 my $datadir = "$srcdir/t/merge_changelogs";
 

+ 5 - 3
src/t/dpkg_divert.t

@@ -13,14 +13,16 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
+use strict;
+use warnings;
+
 use Test::More;
+
 use File::Spec;
+
 use Dpkg::File;
 use Dpkg::IPC;
 
-use strict;
-use warnings;
-
 # Cleanup environment from variables that pollute the test runs.
 delete $ENV{DPKG_MAINTSCRIPT_PACKAGE};
 delete $ENV{DPKG_MAINTSCRIPT_ARCH};

+ 7 - 5
utils/t/update_alternatives.t

@@ -13,14 +13,16 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <https://www.gnu.org/licenses/>.
 
-use Dpkg::IPC;
-use Dpkg::Path qw(find_command);
-use File::Spec;
-use Test::More;
-
 use strict;
 use warnings;
 
+use Test::More;
+
+use File::Spec;
+
+use Dpkg::IPC;
+use Dpkg::Path qw(find_command);
+
 my $srcdir = $ENV{srcdir} || '.';
 my $tmpdir = 't.tmp/update_alternatives';
 my $admindir = File::Spec->rel2abs("$tmpdir/admindir"),