summaryrefslogtreecommitdiffstats
path: root/tests/yanglint/non-interactive/disabled_searchdir.test
blob: 49fe13ee690019cef7554c588bd2af56f347a30c (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)

# Test should be skipped if called by ctest.
test disable_searchdir_once {Unsuccessfully imports module due to disabled cwd searching} {
-constraints {!ctest} -body {
    ly_cmd "$mdir/modimp-cwd.yang"
    ly_cmd_err "-D $mdir/modimp-cwd.yang" "not found in local searchdirs"
}}

test disable_searchdir_twice {Unsuccessfully imports module due to -D -D} {
    ly_cmd "$mdir/ietf-ip.yang"
    ly_cmd_err "-D -D $mdir/ietf-ip.yang" "Loading \"ietf-interfaces\" module failed."
} {}

cleanupTests