yanglint TEST tcltest package integration
The script for the 'except' tool actually uses the tcl language.
And the tcltest package can be used for unit testing. Tests for
yanglint in interactive mode and non-interactive mode can be quite
similar, so naturally tcl scripts can be used for non-interactive mode
testing as well. Because of this, testing using the shunit2 framework
has been removed.
diff --git a/tools/lint/tests/interactive/clear.test b/tools/lint/tests/interactive/clear.test
new file mode 100644
index 0000000..5a247c9
--- /dev/null
+++ b/tools/lint/tests/interactive/clear.test
@@ -0,0 +1,10 @@
+source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/interactive/ly.tcl" : "ly.tcl"}]
+
+test clear_ietf_yang_library {clear --yang-library} {
+-setup $ly_setup -cleanup $ly_cleanup -body {
+ # add models
+ ly_cmd "clear -y"
+ ly_cmd "list" "I ietf-yang-library"
+}}
+
+cleanupTests