summaryrefslogtreecommitdiffstats
path: root/tests/utests/schema/test_yin.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:23:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 04:23:18 +0000
commit16527d165de55f2727f55b752b30d44a7e61e927 (patch)
tree0840ee6e0e109a9e85f0d80ff36f92587c6a5538 /tests/utests/schema/test_yin.c
parentReleasing progress-linux version 2.1.30-2.1~progress7.99u1. (diff)
downloadlibyang2-16527d165de55f2727f55b752b30d44a7e61e927.tar.xz
libyang2-16527d165de55f2727f55b752b30d44a7e61e927.zip
Merging upstream version 2.1.148.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/utests/schema/test_yin.c')
-rw-r--r--tests/utests/schema/test_yin.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/utests/schema/test_yin.c b/tests/utests/schema/test_yin.c
index 0ce3abc..a531b64 100644
--- a/tests/utests/schema/test_yin.c
+++ b/tests/utests/schema/test_yin.c
@@ -395,11 +395,13 @@ test_validate_value(void **state)
YCTX->xmlctx->value = "pre:b";
YCTX->xmlctx->value_len = 5;
assert_int_equal(yin_validate_value(YCTX, Y_IDENTIF_ARG), LY_EVALID);
+ CHECK_LOG_CTX("Invalid identifier character ':' (0x003a).", "Line number 1.");
assert_int_equal(yin_validate_value(YCTX, Y_PREF_IDENTIF_ARG), LY_SUCCESS);
YCTX->xmlctx->value = "pre:pre:b";
YCTX->xmlctx->value_len = 9;
assert_int_equal(yin_validate_value(YCTX, Y_PREF_IDENTIF_ARG), LY_EVALID);
+ CHECK_LOG_CTX("Invalid identifier character ':' (0x003a).", "Line number 1.");
}
static void
@@ -3097,7 +3099,7 @@ test_module_elem(void **state)
assert_int_equal(yin_parse_mod(YCTX, lysp_mod), LY_SUCCESS);
assert_string_equal(lysp_mod->mod->name, "mod");
- assert_string_equal(lysp_mod->revs, "2019-02-02");
+ assert_string_equal(lysp_mod->revs[0].date, "2019-02-02");
assert_string_equal(lysp_mod->mod->ns, "ns");
assert_string_equal(lysp_mod->mod->prefix, "pref");
assert_null(lysp_mod->mod->filepath);
@@ -3230,8 +3232,10 @@ test_submodule_elem(void **state)
assert_int_equal(lyxml_ctx_new(UTEST_LYCTX, UTEST_IN, &YCTX->xmlctx), LY_SUCCESS);
assert_int_equal(yin_parse_submod(YCTX, lysp_submod), LY_SUCCESS);
+ CHECK_LOG_CTX("YANG version 1.1 expects all includes in main module, includes in submodules (mod) are not necessary.",
+ NULL);
assert_string_equal(lysp_submod->name, "mod");
- assert_string_equal(lysp_submod->revs, "2019-02-02");
+ assert_string_equal(lysp_submod->revs[0].date, "2019-02-02");
assert_string_equal(lysp_submod->prefix, "pref");
assert_null(lysp_submod->filepath);
assert_string_equal(lysp_submod->org, "org");