summaryrefslogtreecommitdiffstats
path: root/tests/yanglint/non-interactive/data_in_format.test
blob: f1336ddd53269139bfd81a2ecd42c234690e0f07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 data_in_format_xml {--in-format xml} {
    ly_cmd "-I xml $mdir/modleaf.yang $ddir/modleaf.dxml"
    ly_cmd_err "-I json $mdir/modleaf.yang $ddir/modleaf.dxml" "Failed to parse"
    ly_cmd_err "-I lyb $mdir/modleaf.yang $ddir/modleaf.dxml" "Failed to parse"
} {}

test data_in_format_json {--in-format json} {
    ly_cmd "-I json $mdir/modleaf.yang $ddir/modleaf.djson"
    ly_cmd_err "-I xml $mdir/modleaf.yang $ddir/modleaf.djson" "Failed to parse"
    ly_cmd_err "-I lyb $mdir/modleaf.yang $ddir/modleaf.djson" "Failed to parse"
} {}

cleanupTests