1
0
Fork 0

Adding upstream version 3.12.2.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-02 04:14:41 +02:00
parent 76b2c91d7e
commit f3d737b374
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
66 changed files with 4041 additions and 2142 deletions

View file

@ -886,18 +886,16 @@ test_module(void **state)
/* include */
ly_ctx_set_module_imp_clb(PARSER_CUR_PMOD(YCTX)->mod->ctx, test_imp_clb, "module xxx { namespace urn:xxx; prefix x;}");
in.current = "module" SCHEMA_BEGINNING "include xxx;}";
assert_int_equal(lys_parse_mem(PARSER_CUR_PMOD(YCTX)->mod->ctx, in.current, LYS_IN_YANG, NULL), LY_EVALID);
assert_int_equal(lys_parse_mem(PARSER_CUR_PMOD(YCTX)->mod->ctx, in.current, LYS_IN_YANG, NULL), LY_EINVAL);
CHECK_LOG_CTX("Parsing module \"name\" failed.", NULL, 0);
CHECK_LOG_CTX("Including \"xxx\" submodule into \"name\" failed.", NULL, 0);
CHECK_LOG_CTX("Data model \"xxx\" not found in local searchdirs.", NULL, 0);
CHECK_LOG_CTX("Parsing submodule failed.", NULL, 0);
CHECK_LOG_CTX("Parsing submodule \"xxx\" failed.", NULL, 0);
CHECK_LOG_CTX("Input data contains module in situation when a submodule is expected.", NULL, 0);
ly_ctx_set_module_imp_clb(PARSER_CUR_PMOD(YCTX)->mod->ctx, test_imp_clb, "submodule xxx {belongs-to wrong-name {prefix w;}}");
in.current = "module" SCHEMA_BEGINNING "include xxx;}";
assert_int_equal(lys_parse_mem(PARSER_CUR_PMOD(YCTX)->mod->ctx, in.current, LYS_IN_YANG, NULL), LY_EVALID);
CHECK_LOG_CTX("Parsing module \"name\" failed.", NULL, 0);
CHECK_LOG_CTX("Including \"xxx\" submodule into \"name\" failed.", NULL, 0);
CHECK_LOG_CTX("Parsing submodule \"xxx\" failed.", NULL, 0);
UTEST_LOG_CTX_CLEAN;
ly_ctx_set_module_imp_clb(PARSER_CUR_PMOD(YCTX)->mod->ctx, test_imp_clb, "submodule xxx {belongs-to name {prefix x;}}");