diff options
Diffstat (limited to 'tests/test_event.c')
-rw-r--r-- | tests/test_event.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/test_event.c b/tests/test_event.c index 4924e3f20..92fb4ec78 100644 --- a/tests/test_event.c +++ b/tests/test_event.c @@ -606,6 +606,25 @@ AST_TEST_DEFINE(event_sub_test) res = AST_TEST_FAIL; } + /* Make sure that the tech portion of the device string is case-insensitive */ + sub_res = ast_event_check_subscriber(AST_EVENT_CUSTOM, + AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, "foo/bar", + AST_EVENT_IE_END); + if (sub_res != AST_EVENT_SUB_EXISTS) { + ast_test_status_update(test, "Str FOO/bar subscription lacks proper case-sensitivity for device strings\n"); + res = AST_TEST_FAIL; + } + + /* Make sure that the non-tech portion of the device string is case-sensitive + * and fails to match appropriately */ + sub_res = ast_event_check_subscriber(AST_EVENT_CUSTOM, + AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, "FOO/BAR", + AST_EVENT_IE_END); + if (sub_res == AST_EVENT_SUB_EXISTS) { + ast_test_status_update(test, "Str FOO/bar subscription lacks proper case-sensitivity for device strings\n"); + res = AST_TEST_FAIL; + } + sub_res = ast_event_check_subscriber(AST_EVENT_CUSTOM, AST_EVENT_IE_DEVICE, AST_EVENT_IE_PLTYPE_STR, "Money", AST_EVENT_IE_END); |