diff --git a/tests/src/CMakeLists.txt b/tests/src/CMakeLists.txt
index 0aa4fa5..00bf835 100644
--- a/tests/src/CMakeLists.txt
+++ b/tests/src/CMakeLists.txt
@@ -13,7 +13,8 @@
     src_printer_yin
     src_tree_data
     src_parser_xml
-    src_printer_xml)
+    src_printer_xml
+    src_validation)
 set(local_tests_wraps
     " "
     "-Wl,--wrap=realloc"
@@ -29,6 +30,7 @@
     " "
     " "
     " "
+    " "
     " ")
 set(tests ${tests} ${local_tests} PARENT_SCOPE)
 set(tests_wraps ${tests_wraps} ${local_tests_wraps} PARENT_SCOPE)
diff --git a/tests/src/test_validation.c b/tests/src/test_validation.c
new file mode 100644
index 0000000..eaea51d
--- /dev/null
+++ b/tests/src/test_validation.c
@@ -0,0 +1,157 @@
+/*
+ * @file test_parser_xml.c
+ * @author: Radek Krejci <rkrejci@cesnet.cz>
+ * @brief unit tests for functions from parser_xml.c
+ *
+ * Copyright (c) 2019 CESNET, z.s.p.o.
+ *
+ * This source code is licensed under BSD 3-Clause License (the "License").
+ * You may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://opensource.org/licenses/BSD-3-Clause
+ */
+
+#include <stdarg.h>
+#include <stddef.h>
+#include <setjmp.h>
+#include <cmocka.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#include "../../src/context.h"
+#include "../../src/tree_data_internal.h"
+
+#define BUFSIZE 1024
+char logbuf[BUFSIZE] = {0};
+int store = -1; /* negative for infinite logging, positive for limited logging */
+
+struct ly_ctx *ctx; /* context for tests */
+
+/* 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 */
+    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
+setup(void **state)
+{
+    (void) state; /* unused */
+
+    const char *schema_a =
+        "module a {"
+            "namespace urn:tests:a;"
+            "prefix a;"
+            "yang-version 1.1;"
+
+            "container cont {"
+                "leaf a {"
+                    "when \"../../c = 'val_c'\";"
+                    "type string;"
+                "}"
+                "leaf b {"
+                    "type string;"
+                "}"
+            "}"
+            "leaf c {"
+                "when \"/cont/b = 'val_b'\";"
+                "type string;"
+            "}"
+        "}";
+
+#if ENABLE_LOGGER_CHECKING
+    ly_set_log_clb(logger, 1);
+#endif
+
+    assert_int_equal(LY_SUCCESS, ly_ctx_new(NULL, 0, &ctx));
+    assert_non_null(lys_parse_mem(ctx, schema_a, LYS_IN_YANG));
+
+    return 0;
+}
+
+static int
+teardown(void **state)
+{
+#if ENABLE_LOGGER_CHECKING
+    if (*state) {
+        fprintf(stderr, "%s\n", logbuf);
+    }
+#else
+    (void) state; /* unused */
+#endif
+
+    ly_ctx_destroy(ctx, NULL);
+    ctx = NULL;
+
+    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_when(void **state)
+{
+    *state = test_when;
+
+    const char *data;
+    struct lyd_node *tree;
+
+    data = "<c xmlns=\"urn:tests:a\">hey</c>";
+    assert_int_equal(LY_EVALID, lyd_parse_xml(ctx, data, 0, NULL, &tree));
+    assert_null(tree);
+    logbuf_assert("When condition \"/cont/b = 'val_b'\" not satisfied.");
+
+    data = "<cont xmlns=\"urn:tests:a\"><b>val_b</b></cont><c xmlns=\"urn:tests:a\">hey</c>";
+    assert_int_equal(LY_SUCCESS, lyd_parse_xml(ctx, data, 0, NULL, &tree));
+    assert_non_null(tree);
+    assert_string_equal("c", tree->next->schema->name);
+    assert_int_equal(LYD_WHEN_TRUE, tree->next->flags);
+    lyd_free_all(tree);
+
+    data = "<cont xmlns=\"urn:tests:a\"><a>val</a><b>val_b</b></cont><c xmlns=\"urn:tests:a\">val_c</c>";
+    assert_int_equal(LY_SUCCESS, lyd_parse_xml(ctx, data, 0, NULL, &tree));
+    assert_non_null(tree);
+    assert_string_equal("a", lyd_node_children(tree)->schema->name);
+    assert_int_equal(LYD_WHEN_TRUE, lyd_node_children(tree)->flags);
+    assert_string_equal("c", tree->next->schema->name);
+    assert_int_equal(LYD_WHEN_TRUE, tree->next->flags);
+    lyd_free_all(tree);
+
+    *state = NULL;
+}
+
+int main(void)
+{
+    const struct CMUnitTest tests[] = {
+        cmocka_unit_test_setup_teardown(test_when, setup, teardown),
+    };
+
+    return cmocka_run_group_tests(tests, NULL, NULL);
+}
