tree schema BUGFIX resolve parsed exts for main module only
Submodules may reference the main module and need
to wait for it to be fully parsed before resolving.
Fixes #1943
diff --git a/tests/utests/schema/test_yang.c b/tests/utests/schema/test_yang.c
index 4ce4dc4..97c96ef 100644
--- a/tests/utests/schema/test_yang.c
+++ b/tests/utests/schema/test_yang.c
@@ -75,6 +75,7 @@
/* allocate parser context */
YCTX = calloc(1, sizeof(*YCTX));
+ YCTX->main_ctx = (struct lysp_ctx *)YCTX;
YCTX->format = LYS_IN_YANG;
ly_set_new(&YCTX->parsed_mods);
diff --git a/tests/utests/schema/test_yin.c b/tests/utests/schema/test_yin.c
index af8de4d..3099cac 100644
--- a/tests/utests/schema/test_yin.c
+++ b/tests/utests/schema/test_yin.c
@@ -119,6 +119,7 @@
/* allocate parser context */
YCTX = calloc(1, sizeof(*YCTX));
+ YCTX->main_ctx = (struct lysp_ctx *)YCTX;
YCTX->format = LYS_IN_YIN;
ly_set_new(&YCTX->parsed_mods);