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
69 # The list of functions are not exported in the library because they
70 # are macros or static inline functions. This is only the make the
71 # list complete, there are not used by the test.
72 sort >$test_log/macros_or_inline <<EOF
91 json_object_set_nocheck
94 SOFILE="../src/.libs/libjansson.so"
96 nm -D $SOFILE >/dev/null >$test_log/symbols 2>/dev/null \
97 || exit 77 # Skip if "nm -D" doesn't seem to work
99 grep ' T ' $test_log/symbols | cut -d' ' -f3 | sort >$test_log/output
101 if ! cmp -s $test_log/exports $test_log/output; then
102 diff -u $test_log/exports $test_log/output >&2