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 | 7621b1f | 2023-03-23 15:34:24 +0100 | [diff] [blame] | 3 | test feature_all_default {Default output of feature --all} { |
aPiecek | 266ca76 | 2023-03-22 15:04:59 +0100 | [diff] [blame] | 4 | -setup $ly_setup -cleanup $ly_cleanup -body { |
| 5 | ly_cmd "feature -a" "yang:\r\n\t(none)\r\n\r\nietf-yang-schema-mount:\r\n\t(none)\r\n" -ex |
| 6 | }} |
| 7 | |
aPiecek | 7621b1f | 2023-03-23 15:34:24 +0100 | [diff] [blame] | 8 | test feature_all_add_module {Add module with only one feature and call feature --all} { |
| 9 | -setup $ly_setup -cleanup $ly_cleanup -body { |
| 10 | ly_cmd "load --feature modfeature:ftr1 modfeature" |
| 11 | ly_cmd "feature -a" "modfeature:\r\n\tftr1 \\(on\\)\r\n\tftr2 \\(off\\)" |
| 12 | }} |
| 13 | |
| 14 | test feature_all_on {Add module with all enabled features and call feature --all} { |
| 15 | -setup $ly_setup -cleanup $ly_cleanup -body { |
| 16 | ly_cmd "load --feature modfeature:* modfeature" |
| 17 | ly_cmd "feature -a" "modfeature:\r\n\tftr1 \\(on\\)\r\n\tftr2 \\(on\\)" |
| 18 | }} |
| 19 | |
| 20 | test feature_one_module {Show features for one module} { |
| 21 | -setup $ly_setup -cleanup $ly_cleanup -body { |
| 22 | ly_cmd "load ietf-ip" |
| 23 | ly_cmd "feature -f ietf-ip" " -F ietf-ip:ipv4-non-contiguous-netmasks,ipv6-privacy-autoconf" -ex |
| 24 | }} |
| 25 | |
| 26 | test feature_more_modules {Show a mix of modules with and without features} { |
| 27 | -setup $ly_setup -cleanup $ly_cleanup -body { |
| 28 | |
| 29 | set features " -F modfeature:ftr1,ftr2\ |
| 30 | -F modleaf:\ |
| 31 | -F ietf-ip:ipv4-non-contiguous-netmasks,ipv6-privacy-autoconf" |
| 32 | |
| 33 | ly_cmd "load ietf-ip modleaf modfeature" |
| 34 | ly_cmd "feature -f modfeature modleaf ietf-ip" $features -ex |
| 35 | }} |
| 36 | |
aPiecek | 266ca76 | 2023-03-22 15:04:59 +0100 | [diff] [blame] | 37 | cleanupTests |