@@ -145,6 +145,38 @@ test_leafref(void **state)
145145 }
146146}
147147
148+ static void
149+ test_leafref_w_feature1 (void * * state )
150+ {
151+ int length ;
152+ char * path = * state ;
153+ const struct lys_module * module ;
154+
155+ ly_ctx_set_searchdir (ctx , path );
156+ length = strlen (path );
157+ strcpy (path + length , "/leafref_w_feature1-mod3.yang" );
158+ if (!(module = lys_parse_path (ctx , path , LYS_IN_YANG ))) {
159+ fail ();
160+ }
161+ lys_print_mem (& yang_modules [YANG_MOD_IDX (0 )], module , LYS_OUT_YANG , NULL );
162+ }
163+
164+ static void
165+ test_leafref_w_feature2 (void * * state )
166+ {
167+ int length ;
168+ char * path = * state ;
169+ const struct lys_module * module ;
170+
171+ ly_ctx_set_searchdir (ctx , path );
172+ length = strlen (path );
173+ strcpy (path + length , "/leafref_w_feature2-mod1.yang" );
174+ if (!(module = lys_parse_path (ctx , path , LYS_IN_YANG ))) {
175+ fail ();
176+ }
177+ lys_print_mem (& yang_modules [YANG_MOD_IDX (0 )], module , LYS_OUT_YANG , NULL );
178+ }
179+
148180static void
149181test_target_augment (void * * state )
150182{
@@ -291,6 +323,8 @@ main(void)
291323 cmocka_unit_test_setup_teardown (test_target_include_submodule , setup_ctx_yin , teardown_ctx ),
292324 cmocka_unit_test_setup_teardown (test_leafref , setup_ctx_yin , teardown_ctx ),
293325 cmocka_unit_test_setup_teardown (test_target_augment , setup_ctx_yin , teardown_ctx ),
326+ cmocka_unit_test_setup_teardown (test_leafref_w_feature1 , setup_ctx_yang , teardown_ctx ),
327+ cmocka_unit_test_setup_teardown (test_leafref_w_feature2 , setup_ctx_yang , teardown_ctx ),
294328 cmocka_unit_test_setup_teardown (test_unres_augment , setup_ctx_yin , teardown_ctx ),
295329 cmocka_unit_test_setup_teardown (test_import_augment_target , setup_ctx_yin , teardown_ctx ),
296330 cmocka_unit_test_setup_teardown (test_target_include_submodule , setup_ctx_yang , teardown_ctx ),
0 commit comments