runnableExamples: use the self exe to test the examples

This commit is contained in:
Andreas Rumpf
2018-05-30 11:34:03 +02:00
parent ddc6cec69e
commit 31d9df9e75

View File

@@ -607,7 +607,7 @@ proc testExamples(c: PContext) =
elif isDefined(c.config, "cpp"): "cpp"
elif isDefined(c.config, "objc"): "objc"
else: "c"
if os.execShellCmd("nim " & backend & " -r " & outp) != 0:
if os.execShellCmd(os.getAppFilename() & " " & backend & " -r " & outp) != 0:
quit "[Examples] failed"
removeFile(outp)