summaryrefslogtreecommitdiff
path: root/scripts/t
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2017-05-18 06:25:26 +0200
committerGuillem Jover <guillem@debian.org>2017-05-20 05:21:33 +0200
commit7f779d971f1f9af460cb2286047ab97e854796ac (patch)
treeb3beeed3ceecce88fa9cb411ea65bdab2fca57ac /scripts/t
parent810aa7aec63ded6de321bab69cd1b5e725a0fff1 (diff)
downloaddpkg-7f779d971f1f9af460cb2286047ab97e854796ac.tar.gz
Dpkg::Util: Remove and replace with core module List::Util
Our current minimal Perl version contains a new enough List::Util module implementing none and any, and several other functions.
Diffstat (limited to 'scripts/t')
-rw-r--r--scripts/t/Dpkg_Util.t38
1 files changed, 0 insertions, 38 deletions
diff --git a/scripts/t/Dpkg_Util.t b/scripts/t/Dpkg_Util.t
deleted file mode 100644
index 03a889845..000000000
--- a/scripts/t/Dpkg_Util.t
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/perl
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# 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 tests => 7;
-
-BEGIN {
- use_ok('Dpkg::Util', qw(:list));
-}
-
-my @array = qw(foo bar quux baz);
-my %hash = (foo => 1, bar => 10, quux => 100, baz => 200);
-
-ok(any { 'bar' eq $_ } @array, 'array has item');
-
-ok(!any { 'notfound' eq $_ } @array, 'array does not have item');
-ok(none { 'notfound' eq $_ } @array, 'array lacks item');
-
-ok(any { m/^quu/ } @array, 'array has item matching regex');
-ok(none { m/^notfound/ } @array, 'array lacks item matching regex');
-
-ok(any { m/^quu/ } keys %hash, 'hash has item matching regex');
-
-1;