tests UPDATE simple lyb schema mount use-case
@@ -1199,6 +1199,7 @@ static void
test_parse_config(void **state)
{
const char *xml;
+ char *lyb;
struct lyd_node *data;
const struct lyd_node *node;
@@ -1289,6 +1290,24 @@ test_parse_config(void **state)
assert_string_equal(LYD_NAME(node), "type");
assert_true(node->schema->flags & LYS_CONFIG_R);
+ lyd_print_mem(&lyb, data, LYD_LYB, 0);
+ lyd_free_siblings(data);
+ CHECK_PARSE_LYD_PARAM(lyb, LYD_LYB, LYD_PARSE_STRICT, LYD_VALIDATE_PRESENT, LY_SUCCESS, data);
+ free(lyb);
+
+ node = lyd_child(data);
+ assert_string_equal(LYD_NAME(node), "interfaces");
+ assert_true(node->schema->flags & LYS_CONFIG_R);
+ node = lyd_child(node);
+ assert_string_equal(LYD_NAME(node), "interface");
+ assert_true(node->schema->flags & LYS_CONFIG_R);
+ node = lyd_child(node);
+ assert_string_equal(LYD_NAME(node), "name");
+ assert_true(node->schema->flags & LYS_CONFIG_R);
+ node = node->next;
+ assert_string_equal(LYD_NAME(node), "type");
+ assert_true(node->schema->flags & LYS_CONFIG_R);
+
lyd_free_siblings(data);
}
