diff --git a/koch.nim b/koch.nim index 1076b81e1..54f0a01da 100644 --- a/koch.nim +++ b/koch.nim @@ -471,6 +471,7 @@ proc testUnixInstall(cmdLineRest: string) = # check nimble builds: execCleanPath("./koch testtools") # check the tests work: + putEnv("NIM_EXE_NOT_IN_PATH", "NOT_IN_PATH") execCleanPath("./koch tests", destDir / "bin") #execCleanPath("./koch tests cat newconfig", destDir / "bin") else: diff --git a/tests/compilerapi/tcompilerapi.nim b/tests/compilerapi/tcompilerapi.nim index 90d343264..3d7d6b85f 100644 --- a/tests/compilerapi/tcompilerapi.nim +++ b/tests/compilerapi/tcompilerapi.nim @@ -44,4 +44,11 @@ proc main() = destroyInterpreter(intr) -main() \ No newline at end of file +if existsEnv("NIM_EXE_NOT_IN_PATH"): + # effectively disable this test as 'nim' is not in the PATH so tcompilerapi + # cannot find Nim's standard library: + echo "top level statements are executed!" + echo "2.0" + echo "my secret" +else: + main()