blob: 56481c58b58d2c35bc00967e5fc9bb3825cf1259 [file] [log] [blame]
aPiecek266ca762023-03-22 15:04:59 +01001source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/interactive/ly.tcl" : "ly.tcl"}]
2
aPiecek080c2bf2023-03-28 14:27:52 +02003set mdir $::env(YANG_MODULES_DIR)
4
5test clear_make_implemented_once {clear --make-implemented} {
6-setup $ly_setup -cleanup $ly_cleanup -body {
7 ly_cmd "clear -i"
8 ly_cmd "add $mdir/modmust.yang"
9 ly_cmd "list" "I modmust\r.*I modleaf"
10}}
11
12test clear_make_implemented_twice {clear -i -i} {
13-setup $ly_setup -cleanup $ly_cleanup -body {
14 ly_cmd "clear -i -i"
15 ly_cmd "add $mdir/modmust.yang"
16 ly_cmd "list" "I modmust\r.*I modleaf"
17}}
18
aPiecek266ca762023-03-22 15:04:59 +010019test clear_ietf_yang_library {clear --yang-library} {
20-setup $ly_setup -cleanup $ly_cleanup -body {
21 # add models
22 ly_cmd "clear -y"
23 ly_cmd "list" "I ietf-yang-library"
24}}
25
26cleanupTests