3 # This test checks that libjansson.so exports the correct symbols.
5 # The list of symbols that the shared object should export
6 sort >$test_log/exports <<EOF
15 json_string_set_nocheck
36 json_object_set_new_nocheck
40 json_object_update_existing
41 json_object_update_missing
46 json_object_iter_value
47 json_object_iter_set_new
48 json_object_key_to_iter
70 # The list of functions are not exported in the library because they
71 # are macros or static inline functions. This is only the make the
72 # list complete, there are not used by the test.
73 sort >$test_log/macros_or_inline <<EOF
92 json_object_set_nocheck
95 SOFILE="../src/.libs/libjansson.so"
97 nm -D $SOFILE >/dev/null >$test_log/symbols 2>/dev/null \
98 || exit 77 # Skip if "nm -D" doesn't seem to work
100 grep ' T ' $test_log/symbols | cut -d' ' -f3 | sort >$test_log/output
102 if ! cmp -s $test_log/exports $test_log/output; then
103 diff -u $test_log/exports $test_log/output >&2