blob: 08060cf37b6397f209350c925d97c310e14c4509 [file] [log] [blame]
aPiecek05c75952023-03-29 09:09:44 +02001source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/non-interactive/ly.tcl" : "ly.tcl"}]
2
3set mdir $::env(YANG_MODULES_DIR)
4
5test format_yang {} {
6 ly_cmd "-f yang $mdir/modleaf.yang" "leaf lfl"
7} {}
8
9test format_yin {} {
10 ly_cmd "-f yin $mdir/modleaf.yang" "<leaf name=\"lfl\">"
11} {}
12
13test format_info {} {
14 ly_cmd "-f info $mdir/modleaf.yang" "status current"
15} {}
16
17test format_tree {} {
18 ly_cmd "-f tree $mdir/modleaf.yang" "\\+--rw lfl"
19} {}
20
21test 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
25test 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
34cleanupTests