1
0
Fork 0

Merging upstream version 3.7.8.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-05 08:08:50 +01:00
parent 099007bbc4
commit a3c6363c26
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
52 changed files with 13518 additions and 998 deletions

View file

@ -353,6 +353,14 @@ test_path(void **state)
assert_int_equal(ret, LY_SUCCESS);
assert_non_null(node);
/* too high index */
ret = lyd_new_path2(root, NULL, "/a:c2/l3[8]", NULL, 0, 0, 0, NULL, &node);
assert_int_equal(ret, LY_EINVAL);
CHECK_LOG_CTX("Cannot create \"l3\" on position 8, only 6 instances exist.", NULL, 0);
ret = lyd_new_path2(root, NULL, "/a:l2[2]", NULL, 0, 0, 0, NULL, &node);
assert_int_equal(ret, LY_EINVAL);
CHECK_LOG_CTX("Cannot create \"l2\" on position 2, no instances exist.", NULL, 0);
lyd_print_mem(&str, root, LYD_XML, LYD_PRINT_WITHSIBLINGS);
assert_string_equal(str,
"<c2 xmlns=\"urn:tests:a\">\n"