Skip to content

Commit 6b5ed47

Browse files
committed
tests UPDATE deviate add ext instance
Refs #2496
1 parent dd89fe4 commit 6b5ed47

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/utests/schema/test_tree_schema_compile.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3383,6 +3383,15 @@ test_deviation(void **state)
33833383
assert_string_equal(node->name, "l");
33843384
assert_null(node->next);
33853385

3386+
/* extension */
3387+
assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module mod-a {namespace urn:mod-a;prefix a;"
3388+
"container cont {leaf l {type string;} leaf l2 {type string;}}}", LYS_IN_YANG, NULL));
3389+
assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module mod-b {namespace urn:mod-b;prefix b;"
3390+
"extension ext1; extension ext2;}", LYS_IN_YANG, NULL));
3391+
assert_int_equal(LY_SUCCESS, lys_parse_mem(UTEST_LYCTX, "module mod-c {namespace urn:mod-c;prefix c;"
3392+
"import mod-a {prefix a;} import mod-b {prefix b;}"
3393+
"deviation \"/a:cont/a:l\" {deviate add {b:ext1;}}}", LYS_IN_YANG, NULL));
3394+
33863395
/* default identity referencing deprecated */
33873396
ly_ctx_set_module_imp_clb(UTEST_LYCTX, test_imp_clb, "module a1-imp {namespace urn:a1-imp;prefix a1i;"
33883397
"identity id-base;"

0 commit comments

Comments
 (0)