aPiecek | 266ca76 | 2023-03-22 15:04:59 +0100 | [diff] [blame] | 1 | source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/interactive/ly.tcl" : "ly.tcl"}] |
| 2 | |
aPiecek | 080c2bf | 2023-03-28 14:27:52 +0200 | [diff] [blame] | 3 | set mdir $::env(YANG_MODULES_DIR) |
| 4 | |
aPiecek | 07bc963 | 2023-06-01 12:14:48 +0200 | [diff] [blame^] | 5 | test 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 | |
aPiecek | 080c2bf | 2023-03-28 14:27:52 +0200 | [diff] [blame] | 12 | test 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 | |
| 19 | test 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 | |
aPiecek | 266ca76 | 2023-03-22 15:04:59 +0100 | [diff] [blame] | 26 | test 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 | |
| 33 | cleanupTests |