aPiecek | a5797c1 | 2023-05-17 14:22:46 +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 | set ddir "$::env(TESTS_DIR)/data" |
| 5 | |
| 6 | test ext_data_schema_mount_tree {Print tree output of a model with Schema Mount} { |
| 7 | # mounting node lfl from modleaf.yang into modsm.yang |
| 8 | set out1 "--mp root.*--rw lfl/" |
| 9 | ly_cmd "-f tree -p $mdir -y -x $ddir/modsm_ctx_ext.xml $mdir/modsm.yang" $out1 |
| 10 | } {} |
| 11 | |
| 12 | test ext_data_schema_mount_tree_yanglibfile {Print tree output of a model with Schema Mount and --yang-library-file} { |
| 13 | # yang-library-file context contains an augment node 'alf' for modsm |
| 14 | set out1 "--mp root.*--rw lfl/.*--rw msa:alf?" |
| 15 | ly_cmd "-f tree -p $mdir -Y $ddir/modsm_ctx_main.xml -x $ddir/modsm_ctx_ext.xml $mdir/modsm.yang" $out1 |
| 16 | } {} |
| 17 | |
| 18 | test ext_data_schema_mount_xml {Validating and printing mounted data} { |
| 19 | ly_cmd "-f xml -t config -p $mdir -y -x $ddir/modsm_ctx_ext.xml $mdir/modsm.yang $ddir/modsm.xml" "</lfl>" |
| 20 | } {} |
| 21 | |
| 22 | test ext_data_schema_mount_xml_yanglibfile {Validating and printing mounted data with --yang-library-file} { |
| 23 | set yanglibfile "$ddir/modsm_ctx_main.xml" |
| 24 | set extdata "$ddir/modsm_ctx_ext.xml" |
| 25 | set out1 "</lfl>.*</alf>" |
| 26 | ly_cmd "-f xml -t config -p $mdir -Y $yanglibfile -x $extdata $mdir/modsm.yang $ddir/modsm2.xml" $out1 |
| 27 | } {} |
| 28 | |
| 29 | cleanupTests |