summaryrefslogtreecommitdiff
path: root/main/test.c
diff options
context:
space:
mode:
authorRussell Bryant <russell@russellbryant.com>2010-07-09 15:35:53 +0000
committerRussell Bryant <russell@russellbryant.com>2010-07-09 15:35:53 +0000
commit9aa4771a8da837f1e4139ce93da4adc0d7cc9cf2 (patch)
tree0d63bb01a408c6f4fbac41d60ae5b54809b7a8d4 /main/test.c
parent0cc20f86ba668a4018bbaa4139f75fb1f021c1c3 (diff)
Merged revisions 275021 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r275021 | russell | 2010-07-09 10:33:08 -0500 (Fri, 09 Jul 2010) | 4 lines Document that a leading and trailing slash is expected for test categories. Also, emit a warning if a test is registered without one of these. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@275022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/test.c')
-rw-r--r--main/test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/main/test.c b/main/test.c
index 3427bf205..f35dbdb21 100644
--- a/main/test.c
+++ b/main/test.c
@@ -547,6 +547,11 @@ static struct ast_test *test_alloc(ast_test_cb_t *cb)
return test_free(test);
}
+ if (test->info.category[0] != '/' || test->info.category[strlen(test->info.category) - 1] != '/') {
+ ast_log(LOG_WARNING, "Test category is missing a leading or trailing backslash for test %s%s",
+ test->info.category, test->info.name);
+ }
+
if (ast_strlen_zero(test->info.summary)) {
ast_log(LOG_WARNING, "Test %s/%s has no summary, test registration refused.\n",
test->info.category, test->info.name);