source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/non-interactive/ly.tcl" : "ly.tcl"}]

set mdir "$::env(YANG_MODULES_DIR)"
set ddir "$::env(TESTS_DIR)/data"

test ext_data_schema_mount_xml {Validating and printing mounted data} {
    ly_cmd "-f xml -t config -p $mdir -y -x $ddir/modsm_ctx_ext.xml $mdir/modsm.yang $ddir/modsm.xml" "</lfl>"
} {}

test ext_data_schema_mount_xml_yanglibfile {Validating and printing mounted data with --yang-library-file} {
    set yanglibfile "$ddir/modsm_ctx_main.xml"
    set extdata "$ddir/modsm_ctx_ext.xml"
    set out1 "</lfl>.*</alf>"
    ly_cmd "-f xml -t config -p $mdir -Y $yanglibfile -x $extdata $mdir/modsm.yang $ddir/modsm2.xml" $out1
} {}

cleanupTests
