yanglint TEST printing of submodule
diff --git a/tools/lint/tests/non-interactive/format.test b/tools/lint/tests/non-interactive/format.test
index 303a7b0..5c23ddb 100644
--- a/tools/lint/tests/non-interactive/format.test
+++ b/tools/lint/tests/non-interactive/format.test
@@ -7,10 +7,18 @@
ly_cmd "-f yang $mdir/modleaf.yang" "leaf lfl"
} {}
+test format_yang_submodule {Print submodule in yang format} {
+ ly_cmd "-s modsub -f yang $mdir/modinclude.yang" "submodule modsub"
+} {}
+
test format_yin {} {
ly_cmd "-f yin $mdir/modleaf.yang" "<leaf name=\"lfl\">"
} {}
+test format_yin_submodule {Print submodule in yin format} {
+ ly_cmd "-s modsub -f yin $mdir/modinclude.yang" "<submodule name=\"modsub\""
+} {}
+
test format_info {} {
ly_cmd "-f info $mdir/modleaf.yang" "status current"
} {}
@@ -19,6 +27,10 @@
ly_cmd "-f tree $mdir/modleaf.yang" "\\+--rw lfl"
} {}
+test format_tree_submodule {Print submodule in tree format} {
+ ly_cmd "-s modsub -f tree $mdir/modinclude.yang" "submodule: modsub"
+} {}
+
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"
} {}