From 95f27c617a536a2e5b20d6684ad7ddd803001489 Mon Sep 17 00:00:00 2001 From: russell Date: Fri, 9 Jul 2010 15:33:08 +0000 Subject: 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: http://svn.digium.com/svn/asterisk/branches/1.4@275021 f38db490-d61c-443f-a65b-d21fe96a405b --- main/test.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main/test.c') diff --git a/main/test.c b/main/test.c index 1fada7fa8..f47300908 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); -- cgit v1.2.3