Asterisk - The Open Source Telephony Project
18.5.0
|
#include "asterisk.h"
#include <sys/stat.h>
#include <stdio.h>
#include "asterisk/file.h"
#include "asterisk/paths.h"
#include "asterisk/test.h"
#include "asterisk/module.h"
#include "asterisk/strings.h"
#include "asterisk/vector.h"
Go to the source code of this file.
Macros | |
#define | FOUND -7 |
Functions | |
static void | __reg_module (void) |
static void | __unreg_module (void) |
struct ast_module * | AST_MODULE_SELF_SYM (void) |
AST_TEST_DEFINE (read_dirs_test) | |
AST_VECTOR (_filenames, struct ast_str *) | |
static int | handle_find_file (const char *dir_name, const char *filename, void *obj) |
static int | load_module (void) |
static void | rm_file (struct ast_str *filename) |
static int | test_files_create (struct ast_test *test, char *dir_name, struct _filenames *filenames, int num) |
static int | test_files_destroy (struct ast_test *test, char *dir_name, struct _filenames *filenames) |
static char * | test_files_get_one (struct _filenames *filenames, int num) |
static int | unload_module (void) |
Variables | |
static struct ast_module_info | __mod_info = { .name = AST_MODULE, .flags = AST_MODFLAG_LOAD_ORDER , .description = "File test module" , .key = "This paragraph is copyright (c) 2006 by Digium, Inc. \In order for your module to load, it must return this \key via a function called \"key\". Any code which \includes this paragraph must be licensed under the GNU \General Public License version 2 or later (at your \option). In addition to Digium's general reservations \of rights, Digium expressly reserves the right to \allow other parties to license this paragraph under \different terms. Any use of Digium, Inc. trademarks or \logos (including \"Asterisk\" or \"Digium\") without \express written permission of Digium, Inc. is prohibited.\n" , .buildopt_sum = AST_BUILDOPT_SUM, .load = load_module, .unload = unload_module, .load_pri = AST_MODPRI_DEFAULT, .support_level = AST_MODULE_SUPPORT_CORE, } |
static const struct ast_module_info * | ast_module_info = &__mod_info |
#define FOUND -7 |
Definition at line 36 of file test_file.c.
Referenced by AST_TEST_DEFINE(), and handle_find_file().
|
static |
Definition at line 195 of file test_file.c.
|
static |
Definition at line 195 of file test_file.c.
struct ast_module* AST_MODULE_SELF_SYM | ( | void | ) |
Definition at line 195 of file test_file.c.
AST_TEST_DEFINE | ( | read_dirs_test | ) |
Definition at line 136 of file test_file.c.
References ast_file_read_dirs(), ast_random(), ast_str_alloca, ast_str_buffer(), ast_str_set(), AST_TEST_FAIL, AST_TEST_NOT_RUN, AST_TEST_PASS, ast_test_status_update, FOUND, handle_find_file(), sip_to_pjsip::info(), mkdtemp(), NULL, TEST_EXECUTE, test_files_create(), test_files_destroy(), test_files_get_one(), and TEST_INIT.
AST_VECTOR | ( | _filenames | , |
struct ast_str * | |||
) |
|
static |
Definition at line 119 of file test_file.c.
References ast_alloca, ast_log, errno, FOUND, and LOG_ERROR.
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 189 of file test_file.c.
References AST_MODULE_LOAD_SUCCESS, and AST_TEST_REGISTER.
|
static |
Definition at line 40 of file test_file.c.
References ast_free, ast_log, ast_str_buffer(), and LOG_ERROR.
Referenced by test_files_destroy().
|
static |
Definition at line 66 of file test_file.c.
References ast_free, ast_str_buffer(), ast_str_create, ast_str_set(), ast_test_status_update, AST_VECTOR_APPEND, AST_VECTOR_INIT, mkdtemp(), and test_files_destroy().
Referenced by AST_TEST_DEFINE().
|
static |
Definition at line 49 of file test_file.c.
References ast_test_status_update, AST_VECTOR_CALLBACK_VOID, AST_VECTOR_FREE, and rm_file().
Referenced by AST_TEST_DEFINE(), and test_files_create().
|
static |
Definition at line 112 of file test_file.c.
References ast_random(), ast_str_buffer(), and AST_VECTOR_GET.
Referenced by AST_TEST_DEFINE().
|
static |
|
static |
Definition at line 195 of file test_file.c.
|
static |
Definition at line 195 of file test_file.c.