mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-28 05:34:11 +01:00
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.
This commit is contained in:
parent
db17dd46c0
commit
1daa7f3e95
1 changed files with 6 additions and 0 deletions
|
@ -24,4 +24,10 @@ test_expect_success 'running test' run_test
|
||||||
|
|
||||||
test_begin_subtest 'checking output'
|
test_begin_subtest 'checking output'
|
||||||
test_expect_equal "$result" "$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
|
test_done
|
||||||
|
|
Loading…
Reference in a new issue