aPiecek | 05c7595 | 2023-03-29 09:09:44 +0200 | [diff] [blame] | 1 | source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/non-interactive/ly.tcl" : "ly.tcl"}] |
| 2 | |
| 3 | set mdir $::env(YANG_MODULES_DIR) |
| 4 | |
| 5 | test format_yang {} { |
| 6 | ly_cmd "-f yang $mdir/modleaf.yang" "leaf lfl" |
| 7 | } {} |
| 8 | |
| 9 | test format_yin {} { |
| 10 | ly_cmd "-f yin $mdir/modleaf.yang" "<leaf name=\"lfl\">" |
| 11 | } {} |
| 12 | |
| 13 | test format_info {} { |
| 14 | ly_cmd "-f info $mdir/modleaf.yang" "status current" |
| 15 | } {} |
| 16 | |
| 17 | test format_tree {} { |
| 18 | ly_cmd "-f tree $mdir/modleaf.yang" "\\+--rw lfl" |
| 19 | } {} |
| 20 | |
| 21 | test format_feature_param_one_module {Show features for one module} { |
| 22 | ly_cmd "-f feature-param $mdir/ietf-ip.yang" " -F ietf-ip:ipv4-non-contiguous-netmasks,ipv6-privacy-autoconf" -ex |
| 23 | } {} |
| 24 | |
| 25 | test format_feature_param_more_modules {Show a mix of modules with and without features} { |
| 26 | |
| 27 | set features " -F modfeature:ftr1,ftr2\ |
| 28 | -F modleaf:\ |
| 29 | -F ietf-ip:ipv4-non-contiguous-netmasks,ipv6-privacy-autoconf" |
| 30 | |
| 31 | ly_cmd "-f feature-param $mdir/modfeature.yang $mdir/modleaf.yang $mdir/ietf-ip.yang" $features -ex |
| 32 | } {} |
| 33 | |
| 34 | cleanupTests |