mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
Nimscript: added support for 'patchFile'
This commit is contained in:
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
|
||||
|
||||
Reference in New Issue
Block a user