The branch, master has been updated
via cb6376d061d17c5762552a26a9385bc283ae246d (commit)
from a0d12b9569a8542b2904484089c048471d49d78c (commit)
- Shortlog ------------------------------------------------------------
cb6376d Add non-regression tests for the case of empty dependency fields
Summary of changes:
ChangeLog | 6 ++++++
scripts/Makefile.am | 4 +++-
scripts/t/400_Dpkg_Deps.t | 11 ++++++++---
3 files changed, 17 insertions(+), 4 deletions(-)
-----------------------------------------------------------------------
Details of changes:
commit cb6376d061d17c5762552a26a9385bc283ae246d
Author: Raphael Hertzog <[EMAIL PROTECTED]>
Date: Wed Nov 21 12:09:42 2007 +0100
Add non-regression tests for the case of empty dependency fields
diff --git a/ChangeLog b/ChangeLog
index caaab77..8ec8c25 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,12 @@
* scripts/Dpkg/Shlibs/Objdump.pm: Fix the checks in is_executable() and
is_public_library().
+ * scripts/t/200_Dpkg_Shlibs.t: Add some more tests to make sure
+ the above functions behave as expected.
+ * scripts/t/400_Dpkg_Deps.t: Add some more tests to make sure that
+ empty dependency fields are correctly handled.
+ * scripts/Makefile.am: Include the new data files required by the
+ tests above.
2007-11-20 Guillem Jover <[EMAIL PROTECTED]>
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 538ac58..1e161a0 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -64,7 +64,9 @@ EXTRA_DIST = \
t/200_Dpkg_Shlibs/ld.so.conf.d/recursive.conf \
t/200_Dpkg_Shlibs/objdump.glib-ia64 \
t/200_Dpkg_Shlibs/objdump.libc6-2.3 \
- t/200_Dpkg_Shlibs/objdump.libc6-2.6
+ t/200_Dpkg_Shlibs/objdump.libc6-2.6 \
+ t/200_Dpkg_Shlibs/objdump.dbd-pg \
+ t/200_Dpkg_Shlibs/objdump.ls
CLEANFILES = \
$(bin_SCRIPTS) $(sbin_SCRIPTS) $(changelog_SCRIPTS) \
diff --git a/scripts/t/400_Dpkg_Deps.t b/scripts/t/400_Dpkg_Deps.t
index 82565ae..4751754 100644
--- a/scripts/t/400_Dpkg_Deps.t
+++ b/scripts/t/400_Dpkg_Deps.t
@@ -1,16 +1,16 @@
# -*- mode: cperl;-*-
-use Test::More tests => 12;
+use Test::More tests => 14;
use strict;
use warnings;
use_ok('Dpkg::Deps');
-my $field_multiline = "libgtk2.0-common (= 2.10.13-1) , libatk1.0-0 (>=
+my $field_multiline = " , , libgtk2.0-common (= 2.10.13-1) , libatk1.0-0 (>=
1.13.2), libc6 (>= 2.5-5), libcairo2 (>= 1.4.0), libcupsys2 (>= 1.2.7),
libfontconfig1 (>= 2.4.0), libglib2.0-0 ( >= 2.12.9), libgnutls13 (>=
-1.6.3-0), libjpeg62, python (<< 2.5)";
+1.6.3-0), libjpeg62, python (<< 2.5) , , ";
my $field_multiline_sorted = "libatk1.0-0 (>= 1.13.2), libc6 (>= 2.5-5),
libcairo2 (>= 1.4.0), libcupsys2 (>= 1.2.7), libfontconfig1 (>= 2.4.0),
libglib2.0-0 (>= 2.12.9), libgnutls13 (>= 1.6.3-0), libgtk2.0-common (=
2.10.13-1), libjpeg62, python (<< 2.5)";
my $dep_multiline = Dpkg::Deps::parse($field_multiline);
@@ -53,4 +53,9 @@ my $dep_dup_union = Dpkg::Deps::parse($field_dup_union, union
=> 1);
$dep_dup_union->simplify_deps($facts);
is($dep_dup_union->dump(), "libc6 (>> 2.3), fake (<< 2.0), fake (>> 3.0), fake
(= 2.5), python (<< 2.5)", "Simplify union deps");
+my $dep_empty1 = Dpkg::Deps::parse("");
+is($dep_empty1->dump(), "", "Empty dependency");
+
+my $dep_empty2 = Dpkg::Deps::parse(" , , ", union => 1);
+is($dep_empty2->dump(), "", "' , , ' is also an empty dependency");
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]