[libconfig-model-dpkg-perl] 02/03: test reorder function

dod at debian.org dod at debian.org
Fri Sep 29 12:09:55 UTC 2017


This is an automated email from the git hooks/post-receive script.

dod pushed a commit to branch master
in repository libconfig-model-dpkg-perl.

commit 5ab98099ba22849c1e0358afcd52d06d87d0c616
Author: Dominique Dumont <dod at debian.org>
Date:   Fri Sep 29 14:00:46 2017 +0200

    test reorder function
---
 t/reorder.t | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/t/reorder.t b/t/reorder.t
new file mode 100644
index 0000000..ea52f31
--- /dev/null
+++ b/t/reorder.t
@@ -0,0 +1,27 @@
+# -*- cperl -*-
+
+use 5.10.0;
+use warnings;
+use strict;
+
+use ExtUtils::testlib;
+use Test::More ;
+use Test::Differences;
+use Config::Model::Backend::Dpkg::Control ;
+use Log::Log4perl qw(:easy) ;
+
+
+my @list = ('a' .. 'z');
+my @expect = (qw/a d c b/, 'e' .. 'z');
+my @move_after = (
+    c => 'd',
+    b => 'c',
+    t => 't', # test no-op
+);
+
+Config::Model::Backend::Dpkg::Control::_re_order(\@list, \@move_after);
+
+eq_or_diff(\@list, \@expect," test re-ordered list") ;
+
+
+done_testing();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libconfig-model-dpkg-perl.git



More information about the Pkg-perl-cvs-commits mailing list