X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=test%2Fcommandline.test;h=800dbfcfa166d2f804a388faefe9ecdf83b12ca7;hb=df716df33af8e9a5b93d573a023ecd7fc24d9a03;hp=4bd91f45aac6a4599dfa58a5ed586dda6b9a609b;hpb=7e09765003114ba37fed2851d9126924d0f813f1;p=tinc diff --git a/test/commandline.test b/test/commandline.test index 4bd91f45..800dbfcf 100755 --- a/test/commandline.test +++ b/test/commandline.test @@ -1,6 +1,7 @@ #!/bin/sh -. ./testlib.sh +# shellcheck disable=SC1090 +. "$TESTLIB_PATH" echo [STEP] Initialize one node @@ -28,9 +29,9 @@ tincd foo -D --net foo echo [STEP] Test tincd command line options that should not work -must_fail tincd foo foo -must_fail tincd foo --pidfile -must_fail tincd foo --foo +expect_code "$EXIT_FAILURE" tincd foo foo +expect_code "$EXIT_FAILURE" tincd foo --pidfile +expect_code "$EXIT_FAILURE" tincd foo --foo echo [STEP] Test tinc command line options that should work @@ -42,10 +43,10 @@ tinc foo --net foo get name echo [STEP] Test tinc command line options that should not work -must_fail tinc foo -n foo get somethingreallyunknown -must_fail tinc foo --net -must_fail tinc foo --net get name -must_fail tinc foo foo +expect_code "$EXIT_FAILURE" tinc foo -n foo get somethingreallyunknown +expect_code "$EXIT_FAILURE" tinc foo --net +expect_code "$EXIT_FAILURE" tinc foo --net get name +expect_code "$EXIT_FAILURE" tinc foo foo # Most of these should fail with ASAN. Some leaks are only detected by Valgrind. echo [STEP] Trigger previously known memory leaks