blob: 382b9e93f5f7447f24fdca9566134ef4a35fda4b [file] [log] [blame]
aPieceka96d4432023-03-27 15:49:06 +02001source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/interactive/ly.tcl" : "ly.tcl"}]
2
aPiecek080c2bf2023-03-28 14:27:52 +02003test 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
aPieceka96d4432023-03-27 15:49:06 +02009test 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
aPiecek080c2bf2023-03-28 14:27:52 +020015test 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
25test 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
aPieceka96d4432023-03-27 15:49:06 +020035cleanupTests