yanglint TEST option --present
diff --git a/tools/lint/tests/data/modleaf.xml b/tools/lint/tests/data/modleaf.xml
new file mode 100644
index 0000000..408936a
--- /dev/null
+++ b/tools/lint/tests/data/modleaf.xml
@@ -0,0 +1 @@
+<lfl xmlns="urn:yanglint:modleaf">7</lfl>
diff --git a/tools/lint/tests/data/modmandatory.xml b/tools/lint/tests/data/modmandatory.xml
new file mode 100644
index 0000000..108cb2a
--- /dev/null
+++ b/tools/lint/tests/data/modmandatory.xml
@@ -0,0 +1,3 @@
+<mmc xmlns="urn:yanglint:modmandatory">
+  <lft>9</lft>
+</mmc>
diff --git a/tools/lint/tests/data/modmandatory_invalid.xml b/tools/lint/tests/data/modmandatory_invalid.xml
new file mode 100644
index 0000000..de71895
--- /dev/null
+++ b/tools/lint/tests/data/modmandatory_invalid.xml
@@ -0,0 +1,3 @@
+<mmc xmlns="urn:yanglint:modmandatory">
+  <lff>9</lff>
+</mmc>
diff --git a/tools/lint/tests/interactive/data_present.test b/tools/lint/tests/interactive/data_present.test
new file mode 100644
index 0000000..4228fa6
--- /dev/null
+++ b/tools/lint/tests/interactive/data_present.test
@@ -0,0 +1,18 @@
+source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/interactive/ly.tcl" : "ly.tcl"}]
+
+set ddir "$::env(TESTS_DIR)/data"
+
+test data_present_via_mandatory {validation of mandatory-stmt will pass only with the --present} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+    ly_cmd "load modleaf modmandatory"
+    ly_cmd_err "data $ddir/modleaf.xml" "Mandatory node \"lft\" instance does not exist."
+    ly_cmd "data -e $ddir/modleaf.xml"
+}}
+
+test data_present_merge_invalid {using --present and --merge but data are invalid} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+    ly_cmd "load modleaf modmandatory"
+    ly_cmd_err "data -e -m $ddir/modleaf.xml $ddir/modmandatory_invalid.xml" "Mandatory node \"lft\" instance does not exist."
+}}
+
+cleanupTests
diff --git a/tools/lint/tests/modules/modmandatory.yang b/tools/lint/tests/modules/modmandatory.yang
new file mode 100644
index 0000000..4d48540
--- /dev/null
+++ b/tools/lint/tests/modules/modmandatory.yang
@@ -0,0 +1,14 @@
+module modmandatory {
+  namespace "urn:yanglint:modmandatory";
+  prefix mm;
+
+  container mmc {
+    leaf lft {
+      type int16;
+      mandatory true;
+    }
+    leaf lff {
+      type int16;
+    }
+  }
+}
diff --git a/tools/lint/tests/non-interactive/data_present.test b/tools/lint/tests/non-interactive/data_present.test
new file mode 100644
index 0000000..5ff8783
--- /dev/null
+++ b/tools/lint/tests/non-interactive/data_present.test
@@ -0,0 +1,18 @@
+source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/non-interactive/ly.tcl" : "ly.tcl"}]
+
+set mdir $::env(YANG_MODULES_DIR)
+set ddir $::env(TESTS_DIR)/data
+
+test data_present_via_mandatory {validation of mandatory-stmt will pass only with the --present} {
+    set mods "$mdir/modleaf.yang $mdir/modmandatory.yang"
+    ly_cmd_err "$ddir/modleaf.xml $mods" "Mandatory node \"lft\" instance does not exist."
+    ly_cmd "-e $ddir/modleaf.xml $mods"
+} {}
+
+test data_present_merge_invalid {using --present and --merge but data are invalid} {
+    set mods "$mdir/modleaf.yang $mdir/modmandatory.yang"
+    set data "$ddir/modleaf.xml $ddir/modmandatory_invalid.xml"
+    ly_cmd_err "-e -m  $data $mods" "Mandatory node \"lft\" instance does not exist."
+} {}
+
+cleanupTests