yanglint TEST printing specified subtree
diff --git a/tools/lint/tests/interactive/print.test b/tools/lint/tests/interactive/print.test
index 2cebbbd..943833f 100644
--- a/tools/lint/tests/interactive/print.test
+++ b/tools/lint/tests/interactive/print.test
@@ -1,5 +1,7 @@
 source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/interactive/ly.tcl" : "ly.tcl"}]
 
+set ipv6_path "/ietf-interfaces:interfaces/interface/ietf-ip:ipv6/address"
+
 test print_yang {} {
 -setup $ly_setup -cleanup $ly_cleanup -body {
     ly_cmd "load modleaf"
@@ -18,10 +20,34 @@
     ly_cmd "print -f info modleaf" "status current"
 }}
 
+test print_info_path {Print subtree in info format} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+    ly_cmd "load ietf-ip"
+    ly_cmd "print -f info -P $ipv6_path" "^list address .* leaf prefix-length"
+}}
+
+test print_info_path_single_node {Print node in info format} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+    ly_cmd "load ietf-ip"
+    ly_cmd "print -f info -q -P $ipv6_path" "^list address .* IPv6 addresses on the interface.\";\r\n\}$"
+}}
+
 test print_tree {} {
 -setup $ly_setup -cleanup $ly_cleanup -body {
     ly_cmd "load modleaf"
     ly_cmd "print -f tree modleaf" "\\+--rw lfl"
 }}
 
+test print_tree_path {Print subtree in tree format} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+    ly_cmd "load ietf-ip"
+    ly_cmd "print -f tree -P $ipv6_path" "\\+--rw address.*\\+--rw prefix-length"
+}}
+
+test print_tree_path_single_node {Print node in tree format} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+    ly_cmd "load ietf-ip"
+    ly_cmd "print -f tree -q -P $ipv6_path" "\\+--rw address\\* \\\[ip\\\]$"
+}}
+
 cleanupTests
diff --git a/tools/lint/tests/non-interactive/format.test b/tools/lint/tests/non-interactive/format.test
index 08060cf..e63c8b2 100644
--- a/tools/lint/tests/non-interactive/format.test
+++ b/tools/lint/tests/non-interactive/format.test
@@ -1,6 +1,7 @@
 source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/non-interactive/ly.tcl" : "ly.tcl"}]
 
 set mdir $::env(YANG_MODULES_DIR)
+set ipv6_path "/ietf-interfaces:interfaces/interface/ietf-ip:ipv6/address"
 
 test format_yang {} {
     ly_cmd "-f yang $mdir/modleaf.yang" "leaf lfl"
@@ -18,6 +19,14 @@
     ly_cmd "-f tree $mdir/modleaf.yang" "\\+--rw lfl"
 } {}
 
+test format_tree_path {Print subtree in tree format} {
+    ly_cmd "-f tree -P $ipv6_path $mdir/ietf-ip.yang" "\\+--rw address.*\\+--rw prefix-length"
+} {}
+
+test format_tree_path_single_node {Print node in tree format} {
+    ly_cmd "-f tree -q -P $ipv6_path $mdir/ietf-ip.yang" "\\+--rw address\\* \\\[ip\\\]$"
+} {}
+
 test format_feature_param_one_module {Show features for one module} {
     ly_cmd "-f feature-param $mdir/ietf-ip.yang" " -F ietf-ip:ipv4-non-contiguous-netmasks,ipv6-privacy-autoconf" -ex
 } {}