The following commit has been merged in the master branch:
commit a27d14c4423c44b400764c99b669824f4ba6e9a1
Author: Raphael Hertzog <[email protected]>
Date:   Wed Jul 15 15:59:03 2009 +0200

    Add new test case for symbols file parsing
    
    Ensure that an #include can change the name of the currently parsed
    library (ELF object).

diff --git a/scripts/t/200_Dpkg_Shlibs.t b/scripts/t/200_Dpkg_Shlibs.t
index 48d4a8f..9a7f556 100644
--- a/scripts/t/200_Dpkg_Shlibs.t
+++ b/scripts/t/200_Dpkg_Shlibs.t
@@ -1,6 +1,6 @@
 # -*- mode: cperl;-*-
 
-use Test::More tests => 62;
+use Test::More tests => 63;
 use IO::String;
 
 use strict;
@@ -175,6 +175,12 @@ is_deeply($sym, Dpkg::Shlibs::Symbol->new ( 'symbol' => 
'symbol3_fa...@base',
 is($sym_file->get_smallest_version('libfake.so.1'), "0",
    'get_smallest_version with null version');
 
+$sym = $sym_file->lookup_symbol('symbol_in_libdiv...@base', 
['libdivert.so.1']);
+is_deeply($sym, Dpkg::Shlibs::Symbol->new ( 'symbol' => 
'symbol_in_libdiv...@base',
+                 'minver' => '1.0~beta1', 'dep_id' => 0, 'deprecated' => 0,
+                 'depends' => 'libdivert1 #MINVER#', 'soname' => 
'libdivert.so.1'),
+           '#include can change current object');
+
 $sym_file = Dpkg::Shlibs::SymbolFile->new(file => "$srcdir/symbols.include-2");
 
 $sym = $sym_file->lookup_symbol('symbol1_fa...@base', ['libfake.so.1']);
diff --git a/scripts/t/200_Dpkg_Shlibs/symbols.fake-3 
b/scripts/t/200_Dpkg_Shlibs/symbols.fake-3
new file mode 100644
index 0000000..576bf22
--- /dev/null
+++ b/scripts/t/200_Dpkg_Shlibs/symbols.fake-3
@@ -0,0 +1,5 @@
+# if included, this file will change the current "object" parsed
+# after the include it will be libdivert.so.1 instead of the object
+# of the including symbols file
+libdivert.so.1 libdivert1 #MINVER#
+ divert_someth...@base 1.0
diff --git a/scripts/t/200_Dpkg_Shlibs/symbols.include-1 
b/scripts/t/200_Dpkg_Shlibs/symbols.include-1
index 2576cc2..b524e78 100644
--- a/scripts/t/200_Dpkg_Shlibs/symbols.include-1
+++ b/scripts/t/200_Dpkg_Shlibs/symbols.include-1
@@ -5,3 +5,5 @@ libfake.so.1 libfake1 #MINVER#
 #include "symbols.fake-1"
  symbol3_fa...@base 0
  symbol_af...@base 1.1
+#include "symbols.fake-3"
+ symbol_in_libdiv...@base 1.0~beta1

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to