Nimscript: added support for 'patchFile'
This commit is contained in:
parent
66f37971e9
commit
5e82ffc8d5
7 changed files with 52 additions and 3 deletions
4
tests/newconfig/mymath.nim
Normal file
4
tests/newconfig/mymath.nim
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
|
||||
proc ln*(x: float): float =
|
||||
return 0.5
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue