aPiecek | aa28569 | 2023-04-05 13:36:25 +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 data_present_via_mandatory {validation of mandatory-stmt will pass only with the --present} { |
| 7 | set mods "$mdir/modleaf.yang $mdir/modmandatory.yang" |
| 8 | ly_cmd_err "$ddir/modleaf.xml $mods" "Mandatory node \"lft\" instance does not exist." |
| 9 | ly_cmd "-e $ddir/modleaf.xml $mods" |
| 10 | } {} |
| 11 | |
| 12 | test data_present_merge_invalid {using --present and --merge but data are invalid} { |
| 13 | set mods "$mdir/modleaf.yang $mdir/modmandatory.yang" |
| 14 | set data "$ddir/modleaf.xml $ddir/modmandatory_invalid.xml" |
| 15 | ly_cmd_err "-e -m $data $mods" "Mandatory node \"lft\" instance does not exist." |
| 16 | } {} |
| 17 | |
| 18 | cleanupTests |