Nimscript: added support for 'patchFile'

This commit is contained in:
Andreas Rumpf
2016-07-09 14:26:00 +02:00
parent 66f37971e9
commit 5e82ffc8d5
7 changed files with 52 additions and 3 deletions

View File

@@ -0,0 +1,4 @@
proc ln*(x: float): float =
return 0.5

View File

@@ -1,10 +1,12 @@
discard """
cmd: "nim default $file"
output: '''hello world!'''
output: '''hello world! 0.5'''
msg: '''[NimScript] exec: gcc -v'''
"""
when not defined(definedefine):
{.fatal: "wrong nim script configuration".}
echo "hello world!"
import math
echo "hello world! ", ln 2.0

View File

@@ -11,6 +11,8 @@ import ospaths
warning("uninit", off)
hint("processing", off)
patchFile("stdlib", "math", "mymath")
task listDirs, "lists every subdirectory":
for x in listDirs("."):
echo "DIR ", x