Currently only tests parse_ldso_conf since find_library is difficult to test.
@@ -5,9 +5,6 @@ use Test::More;
use warnings;
use strict;
-use utf8;
-use Encode;
-
# Default cmp '>'
my @versions = ({a => '1.0-1',
b => '2.0-2',
@@ -0,0 +1,18 @@
+# -*- mode: cperl;-*-
+
+use Test::More tests => 2;
+use warnings;
+use strict;
+use_ok('Dpkg::Shlibs');
+my @save_paths = @Dpkg::Shlibs::librarypaths;
+@Dpkg::Shlibs::librarypaths = ();
+Dpkg::Shlibs::parse_ldso_conf("t/200_Dpkg_Shlibs/ld.so.conf");
+use Data::Dumper;
+is_deeply([qw(/nonexistant32 /nonexistant/lib64
+ /usr/local/lib /nonexistant/lib128 )],
+ \@Dpkg::Shlibs::librarypaths, "parsed library paths");
@@ -0,0 +1,9 @@
+# Comment and empty line
+# Paths
+/nonexistant32
+/nonexistant/lib64
+include /nonexistant/*.conf
+include t/200_Dpkg_Shlibs/ld.so.conf.d/*.conf
@@ -0,0 +1 @@
+include t/200_Dpkg_Shlibs/ld.so.conf
+/usr/local/lib/
+include t/200_Dpkg_Shlibs/ld.so.conf_2
+/nonexistant/lib128