Adding upstream version 3.1.0+dfsg.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
64dbec996d
commit
cfcebb1a7d
569 changed files with 205393 additions and 0 deletions
25
tests/yanglint/interactive/data_not_strict.test
Normal file
25
tests/yanglint/interactive/data_not_strict.test
Normal file
|
@ -0,0 +1,25 @@
|
|||
source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/interactive/ly.tcl" : "ly.tcl"}]
|
||||
|
||||
set ddir $::env(TESTS_DIR)/data
|
||||
|
||||
test data_no_strict_basic {} {
|
||||
-setup $ly_setup -cleanup $ly_cleanup -body {
|
||||
ly_cmd "load modleaf"
|
||||
ly_cmd_err "data $ddir/modmandatory.xml" "No module with namespace \"urn:yanglint:modmandatory\" in the context."
|
||||
ly_cmd "data -n $ddir/modmandatory.xml"
|
||||
}}
|
||||
|
||||
test data_no_strict_invalid_data {validation with --no-strict but data are invalid} {
|
||||
-setup $ly_setup -cleanup $ly_cleanup -body {
|
||||
set errmsg "Mandatory node \"lft\" instance does not exist."
|
||||
ly_cmd "load modmandatory"
|
||||
ly_cmd_err "data -n $ddir/modmandatory_invalid.xml" $errmsg
|
||||
}}
|
||||
|
||||
test data_no_strict_ignore_invalid_data {--no-strict ignore invalid data if no schema is provided} {
|
||||
-setup $ly_setup -cleanup $ly_cleanup -body {
|
||||
ly_cmd "load modleaf"
|
||||
ly_cmd "data -f xml -n $ddir/modmandatory_invalid.xml $ddir/modleaf.xml" "modleaf.*</lfl>$"
|
||||
}}
|
||||
|
||||
cleanupTests
|
Loading…
Add table
Add a link
Reference in a new issue