parsers CHANGE clarify function names

- rename lys_parse_nodeid() to ly_parse_nodeid()
- rename lys_parse_instance_predicate() to ly_parse_instance_prediacte()
- both functions were moved into common.c

Both functions provide generic parsing functionality for different path
formats, not limited to schemas. Therefore they now have generic libyang
prefix instead of libyang schema prefix.
diff --git a/src/common.c b/src/common.c
index e34d42e..e658031 100644
--- a/src/common.c
+++ b/src/common.c
@@ -25,6 +25,7 @@
 
 #include "extensions.h"
 #include "tree_schema.h"
+#include "tree_schema_internal.h"
 
 const char *const ly_stmt_list[] = {
     [YANG_ACTION] = "action",
@@ -364,3 +365,156 @@
     *ret = u;
     return LY_SUCCESS;
 }
+
+/**
+ * @brief Parse an identifier.
+ *
+ * ;; An identifier MUST NOT start with (('X'|'x') ('M'|'m') ('L'|'l'))
+ * identifier          = (ALPHA / "_")
+ *                       *(ALPHA / DIGIT / "_" / "-" / ".")
+ *
+ * @param[in,out] id Identifier to parse. When returned, it points to the first character which is not part of the identifier.
+ * @return LY_ERR value: LY_SUCCESS or LY_EINVAL in case of invalid starting character.
+ */
+static LY_ERR
+lys_parse_id(const char **id)
+{
+    assert(id && *id);
+
+    if (!is_yangidentstartchar(**id)) {
+        return LY_EINVAL;
+    }
+    ++(*id);
+
+    while (is_yangidentchar(**id)) {
+        ++(*id);
+    }
+    return LY_SUCCESS;
+}
+
+LY_ERR
+ly_parse_nodeid(const char **id, const char **prefix, size_t *prefix_len, const char **name, size_t *name_len)
+{
+    assert(id && *id);
+    assert(prefix && prefix_len);
+    assert(name && name_len);
+
+    *prefix = *id;
+    *prefix_len = 0;
+    *name = NULL;
+    *name_len = 0;
+
+    LY_CHECK_RET(lys_parse_id(id));
+    if (**id == ':') {
+        /* there is prefix */
+        *prefix_len = *id - *prefix;
+        ++(*id);
+        *name = *id;
+
+        LY_CHECK_RET(lys_parse_id(id));
+        *name_len = *id - *name;
+    } else {
+        /* there is no prefix, so what we have as prefix now is actually the name */
+        *name = *prefix;
+        *name_len = *id - *name;
+        *prefix = NULL;
+    }
+
+    return LY_SUCCESS;
+}
+
+LY_ERR
+ly_parse_instance_predicate(const char **pred, size_t limit,
+                             const char **prefix, size_t *prefix_len, const char **id, size_t *id_len, const char **value, size_t *value_len,
+                             const char **errmsg)
+{
+    LY_ERR ret = LY_EVALID;
+    const char *in = *pred;
+    size_t offset = 1;
+    int expr = 0;
+    char quot;
+
+    assert(in[0] == '\[');
+
+    *prefix = *id = *value = NULL;
+    *prefix_len = *id_len = *value_len = 0;
+
+    /* leading *WSP */
+    for (; isspace(in[offset]); offset++);
+
+    if (isdigit(in[offset])) {
+        /* pos: "[" *WSP positive-integer-value *WSP "]" */
+        if (in[offset] == '0') {
+            /* zero */
+            *errmsg = "The position predicate cannot be zero.";
+            goto error;
+        }
+
+        /* positive-integer-value */
+        *id = &in[offset++];
+        for (; isdigit(in[offset]); offset++);
+        *id_len = &in[offset] - *id;
+
+    } else if (in[offset] == '.') {
+        /* leaf-list-predicate: "[" *WSP "." *WSP "=" *WSP quoted-string *WSP "]" */
+        *id = &in[offset];
+        *id_len = 1;
+        offset++;
+        expr = 1;
+
+    } else {
+        /* key-predicate: "[" *WSP node-identifier *WSP "=" *WSP quoted-string *WSP "]" */
+        in = &in[offset];
+        if (ly_parse_nodeid(&in, prefix, prefix_len, id, id_len)) {
+            *errmsg = "Invalid node-identifier.";
+            goto error;
+        }
+        offset = in - *pred;
+        in = *pred;
+        expr = 1;
+    }
+
+    if (expr) {
+        /*  *WSP "=" *WSP quoted-string *WSP "]" */
+        for (; isspace(in[offset]); offset++);
+
+        if (in[offset] != '=') {
+            *errmsg = "Unexpected character instead of \'=\'.";
+            goto error;
+        }
+        offset++;
+        for (; isspace(in[offset]); offset++);
+
+        /* quoted-string */
+        quot = in[offset++];
+        if (quot != '\'' && quot != '\"') {
+            *errmsg = "String value is not quoted.";
+            goto error;
+        }
+        *value = &in[offset];
+        for (;offset < limit && in[offset] != quot; offset++);
+        *value_len = &in[offset] - *value;
+    }
+
+    /* *WSP "]" */
+    for(; isspace(in[offset]); offset++);
+    if (in[offset] != ']') {
+        *errmsg = "Predicate is not terminated by \']\' character.";
+        goto error;
+    }
+
+    if (offset < limit) {
+        return LY_SUCCESS;
+    }
+
+    /* we read after the limit */
+    *errmsg = "Predicate is incomplete.";
+    *prefix = *id = *value = NULL;
+    *prefix_len = *id_len = *value_len = 0;
+    offset = limit;
+    ret = LY_EINVAL;
+
+error:
+    *pred = &in[offset];
+    return ret;
+}
diff --git a/src/common.h b/src/common.h
index 225414e..c8c4b60 100644
--- a/src/common.h
+++ b/src/common.h
@@ -383,6 +383,42 @@
 LY_ERR ly_parse_uint(const char *val_str, size_t val_len, uint64_t max, int base, uint64_t *ret);
 
 /**
+ * @brief Parse a node-identifier.
+ *
+ * node-identifier     = [prefix ":"] identifier
+ *
+ * @param[in, out] id Identifier to parse. When returned, it points to the first character which is not part of the identifier.
+ * @param[out] prefix Node's prefix, NULL if there is not any.
+ * @param[out] prefix_len Length of the node's prefix, 0 if there is not any.
+ * @param[out] name Node's name.
+ * @param[out] nam_len Length of the node's name.
+ * @return LY_ERR value: LY_SUCCESS or LY_EINVAL in case of invalid character in the id.
+ */
+LY_ERR ly_parse_nodeid(const char **id, const char **prefix, size_t *prefix_len, const char **name, size_t *name_len);
+
+/**
+ * @brief parse instance-identifier's predicate, supports key-predicate, leaf-list-predicate and pos rules from YANG ABNF Grammar.
+ *
+ * @param[in, out] pred Predicate string (including the leading '[') to parse. The string is updated according to what was parsed
+ * (even for error case, so it can be used to determine which substring caused failure).
+ * @param[in] limit Limiting length of the @p pred. Function expects NULL terminated string which is not overread.
+ * The limit value is not checked with each character, so it can be overread and the failure is detected later.
+ * @param[out] prefix Start of the node-identifier's prefix if any, NULL in case of pos or leaf-list-predicate rules.
+ * @param[out] prefix_len Length of the parsed @p prefix.
+ * @param[out] id Start of the node-identifier's identifier string, NULL in case of pos rule, "." in case of leaf-list-predicate rule.
+ * @param[out] id_len Length of the parsed @p id.
+ * @param[out] value Start of the quoted-string (without quotation marks), NULL in case of pos rule.
+ * @param[out] value_len Length of the parsed @p value.
+ * @param[out] errmsg Error message string in case of error.
+ * @return LY_SUCCESS in case a complete predicate was parsed.
+ * @return LY_EVALID in case of invalid predicate form.
+ * @return LY_EINVAL in case of reaching @p limit when parsing @p pred.
+ */
+LY_ERR ly_parse_instance_predicate(const char **pred, size_t limit,
+                                   const char **prefix, size_t *prefix_len, const char **id, size_t *id_len,
+                                   const char **value, size_t *value_len, const char **errmsg);
+
+/**
  * @brief mmap(2) wrapper to map input files into memory to unify parsing.
  *
  * The address space is allocate only for reading.
diff --git a/src/plugins_types.c b/src/plugins_types.c
index 822c05e..f5bdd78 100644
--- a/src/plugins_types.c
+++ b/src/plugins_types.c
@@ -1244,7 +1244,7 @@
         if (token[0] == '/') {
             /* node identifier */
             token++;
-            if (lys_parse_nodeid(&token, &prefix, &prefix_len, &id, &id_len)) {
+            if (ly_parse_nodeid(&token, &prefix, &prefix_len, &id, &id_len)) {
                 asprintf(&errmsg, "Invalid instance-identifier \"%.*s\" value at character %lu.",
                          (int)value_len, value, token - value + 1);
                 goto error;
diff --git a/src/tree_schema_compile.c b/src/tree_schema_compile.c
index c4fa318..68c219f 100644
--- a/src/tree_schema_compile.c
+++ b/src/tree_schema_compile.c
@@ -1972,7 +1972,7 @@
         while (isspace(**predicate)) {
             ++(*predicate);
         }
-        LY_CHECK_GOTO(lys_parse_nodeid(predicate, &src_prefix, &src_prefix_len, &src, &src_len), cleanup);
+        LY_CHECK_GOTO(ly_parse_nodeid(predicate, &src_prefix, &src_prefix_len, &src, &src_len), cleanup);
         while (isspace(**predicate)) {
             ++(*predicate);
         }
@@ -2111,7 +2111,7 @@
         }
 
         while(path_key_expr != pke_end) {
-            if (lys_parse_nodeid(&path_key_expr, &dst_prefix, &dst_prefix_len, &dst, &dst_len)) {
+            if (ly_parse_nodeid(&path_key_expr, &dst_prefix, &dst_prefix_len, &dst, &dst_len)) {
                 LOGVAL(ctx->ctx, LY_VLOG_STR, ctx->path, LYVE_SYNTAX_YANG,
                        "Invalid node identifier in leafref path predicate - character %d (of %.*s).",
                        path_key_expr - start + 1, *predicate - start, start);
@@ -2217,7 +2217,7 @@
     ++(*path);
 
     /* node-identifier ([prefix:]name) */
-    LY_CHECK_RET(lys_parse_nodeid(path, prefix, prefix_len, name, name_len));
+    LY_CHECK_RET(ly_parse_nodeid(path, prefix, prefix_len, name, name_len));
 
     if ((**path == '/' && (*path)[1]) || !**path) {
         /* path continues by another token or this is the last token */
@@ -4381,7 +4381,7 @@
     /* search for the grouping definition */
     found = 0;
     id = uses_p->name;
-    LY_CHECK_RET(lys_parse_nodeid(&id, &prefix, &prefix_len, &name, &name_len), LY_EVALID);
+    LY_CHECK_RET(ly_parse_nodeid(&id, &prefix, &prefix_len, &name, &name_len), LY_EVALID);
     if (prefix) {
         mod = lys_module_find_prefix(ctx->mod_def, prefix, prefix_len);
         if (!mod) {
@@ -5580,7 +5580,7 @@
                         DEV_CHECK_CARDINALITY(d_del->dflts, 1, "default");
                         DEV_CHECK_PRESENCE(struct lysc_node_choice*, 0, dflt, "deleting", "default", d_del->dflts[0]);
                         nodeid = d_del->dflts[0];
-                        LY_CHECK_GOTO(lys_parse_nodeid(&nodeid, &prefix, &prefix_len, &name, &name_len), cleanup);
+                        LY_CHECK_GOTO(ly_parse_nodeid(&nodeid, &prefix, &prefix_len, &name, &name_len), cleanup);
                         if (prefix) {
                             /* use module prefixes from the deviation module to match the module of the default case */
                             if (!(mod = lys_module_find_prefix(ctx->mod, prefix, prefix_len))) {
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index 297bf35..a2a20b3 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -34,159 +34,6 @@
 #include "tree_schema.h"
 #include "tree_schema_internal.h"
 
-/**
- * @brief Parse an identifier.
- *
- * ;; An identifier MUST NOT start with (('X'|'x') ('M'|'m') ('L'|'l'))
- * identifier          = (ALPHA / "_")
- *                       *(ALPHA / DIGIT / "_" / "-" / ".")
- *
- * @param[in,out] id Identifier to parse. When returned, it points to the first character which is not part of the identifier.
- * @return LY_ERR value: LY_SUCCESS or LY_EINVAL in case of invalid starting character.
- */
-static LY_ERR
-lys_parse_id(const char **id)
-{
-    assert(id && *id);
-
-    if (!is_yangidentstartchar(**id)) {
-        return LY_EINVAL;
-    }
-    ++(*id);
-
-    while (is_yangidentchar(**id)) {
-        ++(*id);
-    }
-    return LY_SUCCESS;
-}
-
-LY_ERR
-lys_parse_nodeid(const char **id, const char **prefix, size_t *prefix_len, const char **name, size_t *name_len)
-{
-    assert(id && *id);
-    assert(prefix && prefix_len);
-    assert(name && name_len);
-
-    *prefix = *id;
-    *prefix_len = 0;
-    *name = NULL;
-    *name_len = 0;
-
-    LY_CHECK_RET(lys_parse_id(id));
-    if (**id == ':') {
-        /* there is prefix */
-        *prefix_len = *id - *prefix;
-        ++(*id);
-        *name = *id;
-
-        LY_CHECK_RET(lys_parse_id(id));
-        *name_len = *id - *name;
-    } else {
-        /* there is no prefix, so what we have as prefix now is actually the name */
-        *name = *prefix;
-        *name_len = *id - *name;
-        *prefix = NULL;
-    }
-
-    return LY_SUCCESS;
-}
-
-LY_ERR
-lys_parse_instance_predicate(const char **pred, size_t limit,
-                             const char **prefix, size_t *prefix_len, const char **id, size_t *id_len, const char **value, size_t *value_len,
-                             const char **errmsg)
-{
-    LY_ERR ret = LY_EVALID;
-    const char *in = *pred;
-    size_t offset = 1;
-    int expr = 0;
-    char quot;
-
-    assert(in[0] == '\[');
-
-    *prefix = *id = *value = NULL;
-    *prefix_len = *id_len = *value_len = 0;
-
-    /* leading *WSP */
-    for (; isspace(in[offset]); offset++);
-
-    if (isdigit(in[offset])) {
-        /* pos: "[" *WSP positive-integer-value *WSP "]" */
-        if (in[offset] == '0') {
-            /* zero */
-            *errmsg = "The position predicate cannot be zero.";
-            goto error;
-        }
-
-        /* positive-integer-value */
-        *id = &in[offset++];
-        for (; isdigit(in[offset]); offset++);
-        *id_len = &in[offset] - *id;
-
-    } else if (in[offset] == '.') {
-        /* leaf-list-predicate: "[" *WSP "." *WSP "=" *WSP quoted-string *WSP "]" */
-        *id = &in[offset];
-        *id_len = 1;
-        offset++;
-        expr = 1;
-
-    } else {
-        /* key-predicate: "[" *WSP node-identifier *WSP "=" *WSP quoted-string *WSP "]" */
-        in = &in[offset];
-        if (lys_parse_nodeid(&in, prefix, prefix_len, id, id_len)) {
-            *errmsg = "Invalid node-identifier.";
-            goto error;
-        }
-        offset = in - *pred;
-        in = *pred;
-        expr = 1;
-    }
-
-    if (expr) {
-        /*  *WSP "=" *WSP quoted-string *WSP "]" */
-        for (; isspace(in[offset]); offset++);
-
-        if (in[offset] != '=') {
-            *errmsg = "Unexpected character instead of \'=\'.";
-            goto error;
-        }
-        offset++;
-        for (; isspace(in[offset]); offset++);
-
-        /* quoted-string */
-        quot = in[offset++];
-        if (quot != '\'' && quot != '\"') {
-            *errmsg = "String value is not quoted.";
-            goto error;
-        }
-        *value = &in[offset];
-        for (;offset < limit && in[offset] != quot; offset++);
-        *value_len = &in[offset] - *value;
-    }
-
-    /* *WSP "]" */
-    for(; isspace(in[offset]); offset++);
-    if (in[offset] != ']') {
-        *errmsg = "Predicate is not terminated by \']\' character.";
-        goto error;
-    }
-
-    if (offset < limit) {
-        return LY_SUCCESS;
-    }
-
-    /* we read after the limit */
-    *errmsg = "Predicate is incomplete.";
-    *prefix = *id = *value = NULL;
-    *prefix_len = *id_len = *value_len = 0;
-    offset = limit;
-    ret = LY_EINVAL;
-
-error:
-    *pred = &in[offset];
-    return ret;
-}
-
 LY_ERR
 lys_resolve_schema_nodeid(struct lysc_ctx *ctx, const char *nodeid, size_t nodeid_len, const struct lysc_node *context_node,
                           const struct lys_module *context_module, int nodetype, int implement,
@@ -231,7 +78,7 @@
         ++id;
     }
 
-    while (*id && (ret = lys_parse_nodeid(&id, &prefix, &prefix_len, &name, &name_len)) == LY_SUCCESS) {
+    while (*id && (ret = ly_parse_nodeid(&id, &prefix, &prefix_len, &name, &name_len)) == LY_SUCCESS) {
         if (prefix) {
             mod = lys_module_find_prefix(context_module, prefix, prefix_len);
             if (!mod) {
diff --git a/src/tree_schema_internal.h b/src/tree_schema_internal.h
index b01a496..9ae064b 100644
--- a/src/tree_schema_internal.h
+++ b/src/tree_schema_internal.h
@@ -301,20 +301,6 @@
                          uint16_t flags2, void *mod2, const char *name2);
 
 /**
- * @brief Parse a node-identifier.
- *
- * node-identifier     = [prefix ":"] identifier
- *
- * @param[in, out] id Identifier to parse. When returned, it points to the first character which is not part of the identifier.
- * @param[out] prefix Node's prefix, NULL if there is not any.
- * @param[out] prefix_len Length of the node's prefix, 0 if there is not any.
- * @param[out] name Node's name.
- * @param[out] nam_len Length of the node's name.
- * @return LY_ERR value: LY_SUCCESS or LY_EINVAL in case of invalid character in the id.
- */
-LY_ERR lys_parse_nodeid(const char **id, const char **prefix, size_t *prefix_len, const char **name, size_t *name_len);
-
-/**
  * @brief Find the node according to the given descendant/absolute schema nodeid.
  * Used in unique, refine and augment statements.
  *
@@ -339,28 +325,6 @@
                                  const struct lysc_node **target, uint16_t *result_flag);
 
 /**
- * @brief parse instance-identifier's predicate, supports key-predicate, leaf-list-predicate and pos rules from YANG ABNF Grammar.
- *
- * @param[in, out] pred Predicate string (including the leading '[') to parse. The string is updated according to what was parsed
- * (even for error case, so it can be used to determine which substring caused failure).
- * @param[in] limit Limiting length of the @p pred. Function expects NULL terminated string which is not overread.
- * The limit value is not checked with each character, so it can be overread and the failure is detected later.
- * @param[out] prefix Start of the node-identifier's prefix if any, NULL in case of pos or leaf-list-predicate rules.
- * @param[out] prefix_len Length of the parsed @p prefix.
- * @param[out] id Start of the node-identifier's identifier string, NULL in case of pos rule, "." in case of leaf-list-predicate rule.
- * @param[out] id_len Length of the parsed @p id.
- * @param[out] value Start of the quoted-string (without quotation marks), NULL in case of pos rule.
- * @param[out] value_len Length of the parsed @p value.
- * @param[out] errmsg Error message string in case of error.
- * @return LY_SUCCESS in case a complete predicate was parsed.
- * @return LY_EVALID in case of invalid predicate form.
- * @return LY_EINVAL in case of reaching @p limit when parsing @p pred.
- */
-LY_ERR lys_parse_instance_predicate(const char **pred, size_t limit,
-                                    const char **prefix, size_t *prefix_len, const char **id, size_t *id_len,
-                                    const char **value, size_t *value_len, const char **errmsg);
-
-/**
  * @brief Find the module referenced by prefix in the provided mod.
  *
  * Reverse function to lys_prefix_find_module().
diff --git a/tests/src/test_common.c b/tests/src/test_common.c
index b79f3ec..046950f 100644
--- a/tests/src/test_common.c
+++ b/tests/src/test_common.c
@@ -21,15 +21,28 @@
 
 #define BUFSIZE 1024
 char logbuf[BUFSIZE] = {0};
+int store = -1; /* negative for infinite logging, positive for limited logging */
 
+/* set to 0 to printing error messages to stderr instead of checking them in code */
+#define ENABLE_LOGGER_CHECKING 1
+
+#if ENABLE_LOGGER_CHECKING
 static void
 logger(LY_LOG_LEVEL level, const char *msg, const char *path)
 {
     (void) level; /* unused */
-    (void) path; /* unused */
-
-    strncpy(logbuf, msg, BUFSIZE - 1);
+    if (store) {
+        if (path && path[0]) {
+            snprintf(logbuf, BUFSIZE - 1, "%s %s", msg, path);
+        } else {
+            strncpy(logbuf, msg, BUFSIZE - 1);
+        }
+        if (store > 0) {
+            --store;
+        }
+    }
 }
+#endif
 
 static int
 logger_setup(void **state)
@@ -41,6 +54,30 @@
     return 0;
 }
 
+static int
+logger_teardown(void **state)
+{
+    (void) state; /* unused */
+#if ENABLE_LOGGER_CHECKING
+    if (*state) {
+        fprintf(stderr, "%s\n", logbuf);
+    }
+#endif
+    return 0;
+}
+
+void
+logbuf_clean(void)
+{
+    logbuf[0] = '\0';
+}
+
+#if ENABLE_LOGGER_CHECKING
+#   define logbuf_assert(str) assert_string_equal(logbuf, str)
+#else
+#   define logbuf_assert(str)
+#endif
+
 static void
 test_utf8(void **state)
 {
@@ -119,13 +156,45 @@
 }
 #endif /* not APPLE */
 
+static void
+test_parse_nodeid(void **state)
+{
+    (void) state; /* unused */
+    const char *str;
+    const char *prefix, *name;
+    size_t prefix_len, name_len;
+
+    str = "123";
+    assert_int_equal(LY_EINVAL, ly_parse_nodeid(&str, &prefix, &prefix_len, &name, &name_len));
+
+    str = "a12_-.!";
+    assert_int_equal(LY_SUCCESS, ly_parse_nodeid(&str, &prefix, &prefix_len, &name, &name_len));
+    assert_null(prefix);
+    assert_int_equal(0, prefix_len);
+    assert_non_null(name);
+    assert_int_equal(6, name_len);
+    assert_int_equal(0, strncmp("a12_-.", name, name_len));
+    assert_string_equal("!", str);
+
+    str = "a12_-.:_b2 xxx";
+    assert_int_equal(LY_SUCCESS, ly_parse_nodeid(&str, &prefix, &prefix_len, &name, &name_len));
+    assert_non_null(prefix);
+    assert_int_equal(6, prefix_len);
+    assert_int_equal(0, strncmp("a12_-.", prefix, prefix_len));
+    assert_non_null(name);
+    assert_int_equal(3, name_len);
+    assert_int_equal(0, strncmp("_b2", name, name_len));
+    assert_string_equal(" xxx", str);
+}
+
 int main(void)
 {
     const struct CMUnitTest tests[] = {
-        cmocka_unit_test_setup(test_utf8, logger_setup),
+        cmocka_unit_test_setup_teardown(test_utf8, logger_setup, logger_teardown),
 #ifndef APPLE
         cmocka_unit_test(test_lyrealloc),
 #endif
+        cmocka_unit_test_setup_teardown(test_parse_nodeid, logger_setup, logger_teardown),
     };
 
     return cmocka_run_group_tests(tests, NULL, NULL);
diff --git a/tests/src/test_tree_schema_helpers.c b/tests/src/test_tree_schema_helpers.c
index 563a2f8..5742d78 100644
--- a/tests/src/test_tree_schema_helpers.c
+++ b/tests/src/test_tree_schema_helpers.c
@@ -263,44 +263,12 @@
     ly_ctx_destroy(ctx, NULL);
 }
 
-static void
-test_parse_nodeid(void **state)
-{
-    (void) state; /* unused */
-    const char *str;
-    const char *prefix, *name;
-    size_t prefix_len, name_len;
-
-    str = "123";
-    assert_int_equal(LY_EINVAL, lys_parse_nodeid(&str, &prefix, &prefix_len, &name, &name_len));
-
-    str = "a12_-.!";
-    assert_int_equal(LY_SUCCESS, lys_parse_nodeid(&str, &prefix, &prefix_len, &name, &name_len));
-    assert_null(prefix);
-    assert_int_equal(0, prefix_len);
-    assert_non_null(name);
-    assert_int_equal(6, name_len);
-    assert_int_equal(0, strncmp("a12_-.", name, name_len));
-    assert_string_equal("!", str);
-
-    str = "a12_-.:_b2 xxx";
-    assert_int_equal(LY_SUCCESS, lys_parse_nodeid(&str, &prefix, &prefix_len, &name, &name_len));
-    assert_non_null(prefix);
-    assert_int_equal(6, prefix_len);
-    assert_int_equal(0, strncmp("a12_-.", prefix, prefix_len));
-    assert_non_null(name);
-    assert_int_equal(3, name_len);
-    assert_int_equal(0, strncmp("_b2", name, name_len));
-    assert_string_equal(" xxx", str);
-}
-
 int main(void)
 {
     const struct CMUnitTest tests[] = {
         cmocka_unit_test_setup_teardown(test_date, logger_setup, logger_teardown),
         cmocka_unit_test_setup(test_revisions, logger_setup),
         cmocka_unit_test_setup_teardown(test_typedef, logger_setup, logger_teardown),
-        cmocka_unit_test_setup(test_parse_nodeid, logger_setup),
     };
 
     return cmocka_run_group_tests(tests, NULL, NULL);