yanglint BUGFIX added restriction for LYB printing
diff --git a/tools/lint/tests/interactive/data_format.test b/tools/lint/tests/interactive/data_format.test
index 56a93f6..dc4b7e0 100644
--- a/tools/lint/tests/interactive/data_format.test
+++ b/tools/lint/tests/interactive/data_format.test
@@ -14,4 +14,10 @@
     ly_cmd "data -f json $ddir/modleaf.xml" "{\r\n  \"modleaf:lfl\": 7\r\n}"
 }}
 
+test data_format_lyb_err {Print data in lyb format} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+    ly_cmd "load modleaf"
+    ly_cmd_err "data -f lyb $ddir/modleaf.xml" "The LYB format requires the -o"
+}}
+
 cleanupTests
diff --git a/tools/lint/tests/non-interactive/format.test b/tools/lint/tests/non-interactive/format.test
index 601acfc..8df5544 100644
--- a/tools/lint/tests/non-interactive/format.test
+++ b/tools/lint/tests/non-interactive/format.test
@@ -36,6 +36,10 @@
     ly_cmd "-f json $mdir/modleaf.yang $ddir/modleaf.xml" "{\n  \"modleaf:lfl\": 7\n}"
 } {}
 
+test format_data_lyb_err {Printing in LYB format: expect error due to missing parameter} {
+    ly_cmd_err "-f lyb $mdir/modleaf.yang $ddir/modleaf.xml" "The LYB format requires the -o"
+} {}
+
 test format_tree_submodule {Print submodule in tree format} {
     ly_cmd "-s modsub -f tree $mdir/modinclude.yang" "submodule: modsub"
 } {}