* 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 <guillem@debian.org>
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) \
# -*- 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);
$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");