From: David Bremner <bremner@debian.org>
Date: Tue, 29 Nov 2011 06:51:16 +0000 (-0800)
Subject: test/symbol-hiding: compare exported symbols with existing one
X-Git-Tag: 0.11_rc1~56
X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=1daa7f3e9502974cd6b838e027b88fd9b09bd87a;p=obsolete%2Fnotmuch-old

test/symbol-hiding: compare exported symbols with existing one

We assume that any symbol starting with notmuch_ in lib/*.o should be
exported, and that only those symbols should be exported.
---

diff --git a/test/symbol-hiding b/test/symbol-hiding
index 6d4e4fff..68f0d1b1 100755
--- a/test/symbol-hiding
+++ b/test/symbol-hiding
@@ -24,4 +24,10 @@ test_expect_success 'running test' run_test
 
 test_begin_subtest 'checking output'
 test_expect_equal "$result" "$output" 
+
+test_begin_subtest 'comparing existing to exported symbols'
+objdump -t $TEST_DIRECTORY/../lib/*.o | awk '$4 == ".text" && $6 ~ "^notmuch" {print $6}' | sort | uniq > ACTUAL
+sed -n 's/[[:blank:]]*\(notmuch_[^;]*\);/\1/p' $TEST_DIRECTORY/../notmuch.sym | sort | uniq > EXPORTED
+test_expect_equal_file EXPORTED ACTUAL
+
 test_done