aPiecek | a96d443 | 2023-03-27 15:49:06 +0200 | [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 | test load_basic {} { |
| 4 | -setup $ly_setup -cleanup $ly_cleanup -body { |
| 5 | ly_cmd "load modleafref" |
| 6 | ly_cmd "list" "I modleafref\r.*I modleaf" |
| 7 | }} |
| 8 | |
aPiecek | a96d443 | 2023-03-27 15:49:06 +0200 | [diff] [blame] | 9 | test load_with_feature {Load module with feature} { |
| 10 | -setup $ly_setup -cleanup $ly_cleanup -body { |
| 11 | ly_cmd "load --feature modfeature:ftr2 modfeature" |
| 12 | ly_cmd "feature -a" "modfeature:\r\n\tftr1 \\(off\\)\r\n\tftr2 \\(on\\)" |
| 13 | }} |
| 14 | |
aPiecek | 080c2bf | 2023-03-28 14:27:52 +0200 | [diff] [blame] | 15 | test load_make_implemented_once {load --make-implemented} { |
| 16 | -setup $ly_setup -cleanup $ly_cleanup -body { |
| 17 | ly_ignore "load modmust" |
| 18 | ly_cmd "list" "I modmust\r.*i modleaf" |
| 19 | ly_cmd "clear" |
| 20 | ly_cmd "searchpath $::env(YANG_MODULES_DIR)" |
| 21 | ly_cmd "load -i modmust" |
| 22 | ly_cmd "list" "I modmust\r.*I modleaf" |
| 23 | }} |
| 24 | |
| 25 | test load_make_implemented_twice {load -i -i} { |
| 26 | -setup $ly_setup -cleanup $ly_cleanup -body { |
| 27 | ly_cmd "load modimp-type" |
| 28 | ly_cmd "list" "I modimp-type\r.*i modtypedef" |
| 29 | ly_cmd "clear" |
| 30 | ly_cmd "searchpath $::env(YANG_MODULES_DIR)" |
| 31 | ly_cmd "load -i -i modimp-type" |
| 32 | ly_cmd "list" "I modimp-type\r.*I modtypedef" |
| 33 | }} |
| 34 | |
aPiecek | a96d443 | 2023-03-27 15:49:06 +0200 | [diff] [blame] | 35 | cleanupTests |