blob: 56481c58b58d2c35bc00967e5fc9bb3825cf1259 [file] [log] [blame]
source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/interactive/ly.tcl" : "ly.tcl"}]
set mdir $::env(YANG_MODULES_DIR)
test clear_make_implemented_once {clear --make-implemented} {
-setup $ly_setup -cleanup $ly_cleanup -body {
ly_cmd "clear -i"
ly_cmd "add $mdir/modmust.yang"
ly_cmd "list" "I modmust\r.*I modleaf"
}}
test clear_make_implemented_twice {clear -i -i} {
-setup $ly_setup -cleanup $ly_cleanup -body {
ly_cmd "clear -i -i"
ly_cmd "add $mdir/modmust.yang"
ly_cmd "list" "I modmust\r.*I modleaf"
}}
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