Index: tests/test_event.c =================================================================== --- tests/test_event.c (revision 323455) +++ tests/test_event.c (working copy) @@ -312,7 +312,7 @@ .expected_count = 2, }, [TEST_SUBS_CUSTOM_RAW] = { - .expected_count = 1, + .expected_count = 2, }, [TEST_SUBS_CUSTOM_UINT] = { .expected_count = 1, @@ -678,7 +678,32 @@ res = AST_TEST_FAIL; } + ast_test_status_update(test, "Special event posting test\n"); + /* + * Event to check RAW matching. + * + * Matching subscriptions: + * TEST_SUBS_CUSTOM_RAW + */ + event = ast_event_new(AST_EVENT_CUSTOM, + AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, "Mula", + AST_EVENT_IE_MAILBOX, AST_EVENT_IE_PLTYPE_RAW, "FOO/bar", sizeof("FOO/bar"), + AST_EVENT_IE_END); + if (!event) { + ast_test_status_update(test, "Failed to create event\n"); + res = AST_TEST_FAIL; + goto return_cleanup; + } + if (ast_event_queue(event)) { + ast_event_destroy(event); + event = NULL; + ast_test_status_update(test, "Failed to queue event\n"); + res = AST_TEST_FAIL; + goto return_cleanup; + } + + /* * Subscription TEST_SUBS_CUSTOM_ANY: * - allocate normally * - subscribe to all CUSTOM events