diff options
author | David Bremner <bremner@debian.org> | 2011-11-28 22:51:16 -0800 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2011-12-07 19:56:01 -0400 |
commit | 1daa7f3e9502974cd6b838e027b88fd9b09bd87a (patch) | |
tree | 06f8aafef60b003f91d84a91e54e047d580c2905 /test | |
parent | db17dd46c09707d2c999de9f72bb2b84447bd5a8 (diff) |
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.
Diffstat (limited to 'test')
-rwxr-xr-x | test/symbol-hiding | 6 |
1 files changed, 6 insertions, 0 deletions
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 |