yanglint BUGFIX print tree with line_length param
diff --git a/tools/lint/tests/interactive/print.test b/tools/lint/tests/interactive/print.test
index 943833f..eb36835 100644
--- a/tools/lint/tests/interactive/print.test
+++ b/tools/lint/tests/interactive/print.test
@@ -50,4 +50,10 @@
ly_cmd "print -f tree -q -P $ipv6_path" "\\+--rw address\\* \\\[ip\\\]$"
}}
+test print_tree_path_single_node_line_length {Print node in the tree format and limit row size} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+ ly_cmd "load ietf-ip"
+ ly_cmd "print -f tree -L 20 -q -P $ipv6_path" "\\+--rw address\\*\r\n *\\\[ip\\\]$"
+}}
+
cleanupTests
diff --git a/tools/lint/tests/non-interactive/format.test b/tools/lint/tests/non-interactive/format.test
index e63c8b2..303a7b0 100644
--- a/tools/lint/tests/non-interactive/format.test
+++ b/tools/lint/tests/non-interactive/format.test
@@ -27,6 +27,10 @@
ly_cmd "-f tree -q -P $ipv6_path $mdir/ietf-ip.yang" "\\+--rw address\\* \\\[ip\\\]$"
} {}
+test format_tree_path_single_node_line_length {Print node in the tree format and limit row size} {
+ ly_cmd "-f tree -L 20 -q -P $ipv6_path $mdir/ietf-ip.yang" "\\+--rw address\\*\n *\\\[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
} {}