yanglint TEST of debug option
diff --git a/tools/lint/tests/non-interactive/ly.tcl b/tools/lint/tests/non-interactive/ly.tcl
index 7cdfde8..0f4268d 100644
--- a/tools/lint/tests/non-interactive/ly.tcl
+++ b/tools/lint/tests/non-interactive/ly.tcl
@@ -92,3 +92,19 @@
}
return
}
+
+# Check if yanglint supports the specified option.
+# Parameter opt is a option to be found.
+# Return true if option is found otherwise false.
+proc ly_opt_exists {opt} {
+ namespace import ly::private::*
+ lassign [ly_exec "--help"] rc msg
+ if { $rc != 0 } {
+ error "unexpected return code $rc:\n$msg\n"
+ }
+ if { [output_check $opt $msg] } {
+ return false
+ } else {
+ return true
+ }
+}