yanglint TEST searchpath and path

The 'data' directory is intended for data (xml, json...), but there was
nowhere else to put the module for testing the 'path' parameter, and it
seemed pointless to me to create a new directory for one test.
diff --git a/tools/lint/tests/interactive/clear.test b/tools/lint/tests/interactive/clear.test
index 56481c5..7c03ca6 100644
--- a/tools/lint/tests/interactive/clear.test
+++ b/tools/lint/tests/interactive/clear.test
@@ -2,6 +2,13 @@
 
 set mdir $::env(YANG_MODULES_DIR)
 
+test clear_searchpath {searchpath is also deleted} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+    ly_cmd "searchpath ./"
+    ly_cmd "clear"
+    ly_cmd "searchpath" "List of the searchpaths:" -ex
+}}
+
 test clear_make_implemented_once {clear --make-implemented} {
 -setup $ly_setup -cleanup $ly_cleanup -body {
     ly_cmd "clear -i"
diff --git a/tools/lint/tests/interactive/searchpath.test b/tools/lint/tests/interactive/searchpath.test
new file mode 100644
index 0000000..c1b384f
--- /dev/null
+++ b/tools/lint/tests/interactive/searchpath.test
@@ -0,0 +1,24 @@
+source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/interactive/ly.tcl" : "ly.tcl"}]
+
+set mdir $::env(YANG_MODULES_DIR)
+
+variable ly_setup {
+    spawn $::env(YANGLINT)
+    ly_skip_warnings
+}
+
+test searchpath_basic {} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+    ly_cmd "searchpath $mdir"
+    ly_cmd "searchpath" "$mdir"
+    ly_cmd "load modleaf"
+}}
+
+test searchpath_clear {searchpath --clear} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+    ly_cmd "searchpath $mdir"
+    ly_cmd "searchpath --clear"
+    ly_cmd_err "load modleaf" "Data model \"modleaf\" not found in local searchdirs"
+}}
+
+cleanupTests
diff --git a/tools/lint/tests/modules/modimp-path.yang b/tools/lint/tests/modules/modimp-path.yang
new file mode 100644
index 0000000..d9dbb9b
--- /dev/null
+++ b/tools/lint/tests/modules/modimp-path.yang
@@ -0,0 +1,8 @@
+module modimp-path {
+  namespace "urn:yanglint:modimp-path";
+  prefix ip;
+
+  import modpath {
+    prefix mp;
+  }
+}
diff --git a/tools/lint/tests/modules/modpath.yang b/tools/lint/tests/modules/modpath.yang
new file mode 100644
index 0000000..da099a2
--- /dev/null
+++ b/tools/lint/tests/modules/modpath.yang
@@ -0,0 +1,4 @@
+module modpath {
+  namespace "urn:yanglint:modpath";
+  prefix mp;
+}
diff --git a/tools/lint/tests/non-interactive/path.test b/tools/lint/tests/non-interactive/path.test
new file mode 100644
index 0000000..bf915ff
--- /dev/null
+++ b/tools/lint/tests/non-interactive/path.test
@@ -0,0 +1,9 @@
+source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/non-interactive/ly.tcl" : "ly.tcl"}]
+
+set mdir $env(YANG_MODULES_DIR)
+
+test path_basic {} {
+    ly_cmd "-p $::env(TESTS_DIR)/data $::env(YANG_MODULES_DIR)/modimp-path.yang"
+} {}
+
+cleanupTests