aPiecek | e75fce5 | 2023-04-04 15:25:21 +0200 | [diff] [blame] | 1 | source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/interactive/ly.tcl" : "ly.tcl"}] |
| 2 | |
| 3 | set ddir "$::env(TESTS_DIR)/data" |
| 4 | |
| 5 | test data_merge_basic {Data is merged and the node is added} { |
| 6 | -setup $ly_setup -cleanup $ly_cleanup -body { |
| 7 | ly_cmd "load modmerge" |
| 8 | ly_cmd "data -m -f xml $ddir/modmerge.xml $ddir/modmerge3.xml" "<en>.*<lm>.*<lf>" |
| 9 | }} |
| 10 | |
| 11 | test data_merge_validation_failed {Data is merged but validation failed.} { |
| 12 | -setup $ly_setup -cleanup $ly_cleanup -body { |
| 13 | ly_cmd "load modmerge" |
| 14 | ly_cmd "data $ddir/modmerge.xml" |
| 15 | ly_cmd "data $ddir/modmerge2.xml" |
| 16 | ly_cmd "data -m $ddir/modmerge2.xml $ddir/modmerge.xml" |
| 17 | ly_cmd_err "data -m $ddir/modmerge.xml $ddir/modmerge2.xml" "Merged data are not valid" |
| 18 | }} |
| 19 | |
aPiecek | 3d46fa9 | 2023-05-10 08:30:39 +0200 | [diff] [blame] | 20 | test data_merge_dataconfig {The merge option has effect only for 'data' and 'config' TYPEs} { |
| 21 | -setup $ly_setup -cleanup $ly_cleanup -body { |
| 22 | ly_cmd "load modrpc modnotif modconfig modleaf" |
| 23 | set wrn1 "option has effect only for" |
| 24 | ly_cmd_wrn "data -m -t rpc $ddir/modrpc.xml $ddir/modrpc.xml" $wrn1 |
| 25 | ly_cmd_wrn "data -m -t notif $ddir/modnotif2.xml $ddir/modnotif2.xml" $wrn1 |
| 26 | ly_cmd_wrn "data -m -t get $ddir/modleaf.xml $ddir/modconfig.xml" $wrn1 |
| 27 | ly_cmd_wrn "data -m -t getconfig $ddir/modleaf.xml $ddir/modconfig2.xml" $wrn1 |
| 28 | ly_cmd_wrn "data -m -t edit $ddir/modleaf.xml $ddir/modconfig2.xml" $wrn1 |
| 29 | ly_cmd "data -m -t config $ddir/modleaf.xml $ddir/modconfig2.xml" |
| 30 | ly_cmd "data -m -t data $ddir/modleaf.xml $ddir/modconfig.xml" |
| 31 | }} |
| 32 | |
aPiecek | e75fce5 | 2023-04-04 15:25:21 +0200 | [diff] [blame] | 33 | cleanupTests |