11 if [ "$verbose" = "1" ]; then
17 if [ "$1" = "-v" ]; then
22 if [ -z "$LIBTOOL" ]; then
23 if [ -f ../libtool ]; then
30 echo_v "Running assert-msg-test"
31 OUT=$(./assert-msg-test 2>&1) && fail "assert-msg-test should abort"
32 echo "$OUT" | grep -q '^GLib:ERROR:.*assert-msg-test.c:.*:.*main.*: assertion failed: (42 < 0)' || \
33 fail "does not print assertion message"
35 if ! type gdb >/dev/null 2>&1; then
36 echo_v "Skipped (no gdb installed)"
40 echo_v "Running gdb on assert-msg-test"
41 OUT=$($LIBTOOL --mode=execute gdb --batch -x ${srcdir:-.}/assert-msg-test.gdb ./assert-msg-test 2> $error_out) || fail "failed to run gdb"
43 echo_v "Checking if assert message is in __glib_assert_msg"
44 if ! echo "$OUT" | grep -q '^$1.*"GLib:ERROR:.*assert-msg-test.c:.*:.*main.*: assertion failed: (42 < 0)"'; then
45 fail "__glib_assert_msg does not have assertion message"
48 echo_v "All tests passed."