#include <glob.h>
#include "conf/validation.h"
#include "conf/ut/common.h"
#include "lib/fs.h"
#include "lib/string.h"
#include "lib/memory.h"
#include "ut/ut.h"
Go to the source code of this file.
◆ _UT_ASSERT
#define _UT_ASSERT |
( |
|
cond | ) |
|
Value: "path=%s\n" \
"err={%s}\n" \
"expected={%s}\n" \
"g_buf={%s}", \
#define M0_ASSERT_INFO(cond, fmt,...)
◆ cache_load()
static void cache_load |
( |
struct m0_conf_cache * |
cache, |
|
|
const char * |
path, |
|
|
char ** |
sharp_out |
|
) |
| |
|
static |
- Note
- Don't forget to free(*sharp_out).
Definition at line 136 of file validation.c.
◆ sharp_comment()
static char* sharp_comment |
( |
const char * |
input | ) |
|
|
static |
If the first line of the input matches /^#+=/ regexp, sharp_comment() returns the remainder of this line without the matched prefix. The returned string is stripped of leading and trailing blanks.
If there is no match, sharp_comment() returns NULL.
- Note
- The returned pointer should be free()d. (But not m0_free()d.)
Definition at line 80 of file validation.c.
◆ test_sharp_comment()
static void test_sharp_comment |
( |
void |
| ) |
|
|
static |
◆ test_validation()
static void test_validation |
( |
void |
| ) |
|
|
static |
◆ conf_validation_ut
Initial value:= {
.ts_name = "conf-validation-ut",
.ts_tests = {
}
}
M0_INTERNAL int m0_conf_ut_cache_init(void)
static void test_validation(void)
M0_INTERNAL int m0_conf_ut_cache_fini(void)
static void test_sharp_comment(void)
Definition at line 151 of file validation.c.
◆ g_buf