131 static const char group1_full[] =
BASE_GROUP "groupgroup";
132 static const char group2_full[] =
BASE_GROUP "Groupgroup";
133 static const char regex1[] =
"gr";
134 static const char regex2[] =
"(group){2}$";
135 static const char regex3[] =
"[:ascii:]";
136 static const char regex4[] =
"^(NOMATCH)";
137 static const char category1_full[] =
BASE_GROUP "@a_category";
138 static const char category2_full[] =
BASE_GROUP "@another!Category";
139 static const char regex5[] =
"(gory)$";
140 static const char regex6[] =
"[A-Z]+";
141 static const char regex7[] =
"[[";
143 static const struct group_test_params {
144 const char *groupmatch;
145 const char *category;
162 info->name =
"app_group";
163 info->category =
"/main/app/";
164 info->summary =
"App group unit test";
166 "This tests various app group functionality";
173 "'%s', '%s', '%s', '%s'\n", group1_full, group2_full, category1_full, category2_full);
177 goto exit_group_test;
182 goto exit_group_test;
187 goto exit_group_test;
192 goto exit_group_test;
201 for (i = 0; i <
ARRAY_LEN(subtests); i++) {
205 if (subtests[i].expected != returned_count) {
207 i + 1, subtests[i].expected, returned_count, subtests[i].groupmatch, subtests[i].category);
209 goto exit_group_test;
212 i + 1, subtests[i].expected, subtests[i].groupmatch, subtests[i].category);
Main Channel structure associated with a channel.
#define ast_test_status_update(a, b, c...)
#define ast_channel_unlock(chan)
void ast_hangup(struct ast_channel *chan)
Hang up a channel.
int ast_app_group_match_get_count(const char *groupmatch, const char *category)
Get the current channel count of all groups that match the specified pattern and category.
#define ast_channel_alloc(needqueue, state, cid_num, cid_name, acctcode, exten, context, assignedids, requestor, amaflag,...)
Create a channel structure.
int ast_app_group_set_channel(struct ast_channel *chan, const char *data)
Set the group for a channel, splitting the provided data into group and category, if specified...