blob: 49fe13ee690019cef7554c588bd2af56f347a30c [file] [log] [blame]
aPiecek5bbdc022023-03-27 13:15:46 +02001source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/non-interactive/ly.tcl" : "ly.tcl"}]
2
3set mdir $env(YANG_MODULES_DIR)
4
5# Test should be skipped if called by ctest.
6test disable_searchdir_once {Unsuccessfully imports module due to disabled cwd searching} {
7-constraints {!ctest} -body {
8 ly_cmd "$mdir/modimp-cwd.yang"
9 ly_cmd_err "-D $mdir/modimp-cwd.yang" "not found in local searchdirs"
10}}
11
12test disable_searchdir_twice {Unsuccessfully imports module due to -D -D} {
13 ly_cmd "$mdir/ietf-ip.yang"
14 ly_cmd_err "-D -D $mdir/ietf-ip.yang" "Loading \"ietf-interfaces\" module failed."
15} {}
16
17cleanupTests
18