yanglint TEST for option --type get
diff --git a/tools/lint/tests/data/modleafref.xml b/tools/lint/tests/data/modleafref.xml
new file mode 100644
index 0000000..c9fb147
--- /dev/null
+++ b/tools/lint/tests/data/modleafref.xml
@@ -0,0 +1,2 @@
+<lfl xmlns="urn:yanglint:modleaf">7</lfl>
+<lfr xmlns="urn:yanglint:modleafref">7</lfr>
diff --git a/tools/lint/tests/data/modleafref2.xml b/tools/lint/tests/data/modleafref2.xml
new file mode 100644
index 0000000..3946daf
--- /dev/null
+++ b/tools/lint/tests/data/modleafref2.xml
@@ -0,0 +1,2 @@
+<lfl xmlns="urn:yanglint:modleaf">7</lfl>
+<lfr xmlns="urn:yanglint:modleafref">10</lfr>
diff --git a/tools/lint/tests/interactive/data_type.test b/tools/lint/tests/interactive/data_type.test
index db93af4..5adbd39 100644
--- a/tools/lint/tests/interactive/data_type.test
+++ b/tools/lint/tests/interactive/data_type.test
@@ -15,4 +15,11 @@
ly_cmd "data -t config $ddir/modconfig2.xml"
}}
+test data_type_get {data --type get} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+ ly_cmd "load modleafref"
+ ly_cmd_err "data -t data $ddir/modleafref2.xml" "Invalid leafref value"
+ ly_cmd "data -t get $ddir/modleafref2.xml"
+}}
+
cleanupTests
diff --git a/tools/lint/tests/non-interactive/data_type.test b/tools/lint/tests/non-interactive/data_type.test
index 9631b22..339b0e3 100644
--- a/tools/lint/tests/non-interactive/data_type.test
+++ b/tools/lint/tests/non-interactive/data_type.test
@@ -12,4 +12,9 @@
ly_cmd "-t config $mdir/modconfig.yang $ddir/modconfig2.xml"
} {}
+test data_type_get {data --type get} {
+ ly_cmd_err "-t data $mdir/modleafref.yang $ddir/modleafref2.xml" "Invalid leafref value"
+ ly_cmd "-t get $mdir/modleafref.yang $ddir/modleafref2.xml"
+} {}
+
cleanupTests