Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replaced ~~ with is_deeply() test to fix 5.18 smartmatch deprecation …

…warnings.

I thought I already fixed this, but I only did so for one file. I was using the
same copied and pasted code in multiple files, so I had to change it for all of
them.
  • Loading branch information...
commit a9f5bbcd4a07728df94e59720aac112326380171 1 parent 74c1d3e
@deeelwy authored
View
6 lib/App/Fetchware/ExportAPI.pm
@@ -178,11 +178,7 @@ sub _export_api {
}
}
}
-use Test::More;
-note("CALLER[$callers_package_name]");
-note("APISUBS[");
-note explain \%api_subs;
-note("]");
+
die <<EOD if (grep {$api_subs{$_} == 1} keys %api_subs) != 9;
App-Fetchware-Util: export_api() must be called with either or both of the KEEP
and OVERRIDE options, and you must supply the names of all of fetchware's API
View
6 t/App-Fetchware-Config.t
@@ -43,11 +43,9 @@ subtest 'CONFIG export what they should' => sub {
);
# sort them to make the testing their equality very easy.
- @expected_util_exports = sort @expected_util_exports;
-
my @sorted_util_tag = sort @{$App::Fetchware::Config::EXPORT_TAGS{CONFIG}};
-
- ok(@expected_util_exports ~~ @sorted_util_tag,
+ @expected_util_exports = sort @expected_util_exports;
+ is_deeply(\@sorted_util_tag, \@expected_util_exports,
'checked for correct CONFIG @EXPORT_TAG');
};
View
5 t/App-Fetchware-Util.t
@@ -65,10 +65,9 @@ subtest 'UTIL export what they should' => sub {
);
# sort them to make the testing their equality very easy.
- @expected_util_exports = sort @expected_util_exports;
my @sorted_util_tag = sort @{$App::Fetchware::Util::EXPORT_TAGS{UTIL}};
-
- ok(@expected_util_exports ~~ @sorted_util_tag,
+ @expected_util_exports = sort @expected_util_exports;
+ is_deeply(\@sorted_util_tag, \@expected_util_exports,
'checked for correct UTIL @EXPORT_TAG');
};
View
4 t/App-Fetchware-build.t
@@ -40,9 +40,9 @@ subtest 'OVERRIDE_BUILD exports what it should' => sub {
run_configure
);
# sort them to make the testing their equality very easy.
- @expected_overide_build_exports = sort @expected_overide_build_exports;
my @sorted_build_tag = sort @{$App::Fetchware::EXPORT_TAGS{OVERRIDE_BUILD}};
- ok(@expected_overide_build_exports ~~ @sorted_build_tag,
+ @expected_overide_build_exports = sort @expected_overide_build_exports;
+ is_deeply(\@sorted_build_tag, \@expected_overide_build_exports,
'checked for correct OVERRIDE_BUILD @EXPORT_TAG');
};
View
4 t/App-Fetchware-download.t
@@ -41,9 +41,9 @@ subtest 'OVERRIDE_DOWNLOAD exports what it should' => sub {
determine_package_path
);
# sort them to make the testing their equality very easy.
- @expected_overide_download_exports = sort @expected_overide_download_exports;
my @sorted_download_tag = sort @{$App::Fetchware::EXPORT_TAGS{OVERRIDE_DOWNLOAD}};
- ok(@expected_overide_download_exports ~~ @sorted_download_tag,
+ @expected_overide_download_exports = sort @expected_overide_download_exports;
+ is_deeply(\@sorted_download_tag, \@expected_overide_download_exports,
'checked for correct OVERRIDE_DOWNLOAD @EXPORT_TAG');
};
View
4 t/App-Fetchware-install.t
@@ -41,9 +41,9 @@ subtest 'OVERRIDE_INSTALL exports what it should' => sub {
chdir_unless_already_at_path
);
# sort them to make the testing their equality very easy.
- @expected_overide_install_exports = sort @expected_overide_install_exports;
my @sorted_install_tag = sort @{$App::Fetchware::EXPORT_TAGS{OVERRIDE_INSTALL}};
- ok(@expected_overide_install_exports ~~ @sorted_install_tag,
+ @expected_overide_install_exports = sort @expected_overide_install_exports;
+ is_deeply(\@sorted_install_tag, \@expected_overide_install_exports,
'checked for correct OVERRIDE_INSTALL @EXPORT_TAG');
};
View
4 t/App-Fetchware-lookup.t
@@ -46,9 +46,9 @@ subtest 'OVERRIDE_LOOKUP exports what it should' => sub {
lookup_determine_downloadpath
);
# sort them to make the testing their equality very easy.
- @expected_overide_lookup_exports = sort @expected_overide_lookup_exports;
my @sorted_lookup_tag = sort @{$App::Fetchware::EXPORT_TAGS{OVERRIDE_LOOKUP}};
- ok(@expected_overide_lookup_exports ~~ @sorted_lookup_tag,
+ @expected_overide_lookup_exports = sort @expected_overide_lookup_exports;
+ is_deeply(\@sorted_lookup_tag, \@expected_overide_lookup_exports,
'checked for correct OVERRIDE_LOOKUP @EXPORT_TAG');
};
View
4 t/App-Fetchware-unarchive.t
@@ -47,10 +47,10 @@ subtest 'OVERRIDE_UNARCHIVE exports what it should' => sub {
unarchive_zip
);
# sort them to make the testing their equality very easy.
- @expected_overide_unarchive_exports = sort @expected_overide_unarchive_exports;
my @sorted_unarchive_tag = sort
@{$App::Fetchware::EXPORT_TAGS{OVERRIDE_UNARCHIVE}};
- ok(@expected_overide_unarchive_exports ~~ @sorted_unarchive_tag,
+ @expected_overide_unarchive_exports = sort @expected_overide_unarchive_exports;
+ is_deeply(\@sorted_unarchive_tag, \@expected_overide_unarchive_exports,
'checked for correct OVERRIDE_UNARCHIVE @EXPORT_TAG');
};
View
4 t/App-Fetchware-verify.t
@@ -45,9 +45,9 @@ subtest 'OVERRIDE_VERIFY exports what it should' => sub {
digest_verify
);
# sort them to make the testing their equality very easy.
- @expected_overide_verify_exports = sort @expected_overide_verify_exports;
my @sorted_verify_tag = sort @{$App::Fetchware::EXPORT_TAGS{OVERRIDE_VERIFY}};
- ok(@expected_overide_verify_exports ~~ @sorted_verify_tag,
+ @expected_overide_verify_exports = sort @expected_overide_verify_exports;
+ is_deeply(\@sorted_verify_tag, \@expected_overide_verify_exports,
'checked for correct OVERRIDE_VERIFY @EXPORT_TAG');
};
View
9 t/Test-Fetchware.t
@@ -52,13 +52,8 @@ subtest 'TESTING export what they should' => sub {
# sort them to make the testing their equality very easy.
@expected_testing_exports = sort @expected_testing_exports;
my @sorted_testing_tag = sort @{$Test::Fetchware::EXPORT_TAGS{TESTING}};
-
- for my $i (0..$#sorted_testing_tag) {
- unless ($sorted_testing_tag[$i] eq $expected_testing_exports[$i]) {
- fail('checked for correct TESTING @EXPORT_TAG failed');
- }
- }
- pass('checked for correct TESTING @EXPORT_TAG');
+ is_deeply(\@sorted_testing_tag, \@expected_testing_exports,
+ 'checked for correct exports.');
};
Please sign in to comment.
Something went wrong with that request. Please try again.