runnableExamples: use the self exe to test the examples

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

View file

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