blob: 7c03ca6be23c095b7271e22230053eb05e025d05 [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
aPiecek07bc9632023-06-01 12:14:48 +02005test clear_searchpath {searchpath is also deleted} {
6-setup $ly_setup -cleanup $ly_cleanup -body {
7 ly_cmd "searchpath ./"
8 ly_cmd "clear"
9 ly_cmd "searchpath" "List of the searchpaths:" -ex
10}}
11
aPiecek080c2bf2023-03-28 14:27:52 +020012test clear_make_implemented_once {clear --make-implemented} {
13-setup $ly_setup -cleanup $ly_cleanup -body {
14 ly_cmd "clear -i"
15 ly_cmd "add $mdir/modmust.yang"
16 ly_cmd "list" "I modmust\r.*I modleaf"
17}}
18
19test clear_make_implemented_twice {clear -i -i} {
20-setup $ly_setup -cleanup $ly_cleanup -body {
21 ly_cmd "clear -i -i"
22 ly_cmd "add $mdir/modmust.yang"
23 ly_cmd "list" "I modmust\r.*I modleaf"
24}}
25
aPiecek266ca762023-03-22 15:04:59 +010026test clear_ietf_yang_library {clear --yang-library} {
27-setup $ly_setup -cleanup $ly_cleanup -body {
28 # add models
29 ly_cmd "clear -y"
30 ly_cmd "list" "I ietf-yang-library"
31}}
32
33cleanupTests