mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-08 14:03:23 +00:00
* fix megatest newlines * still allow missing trailing newline for now but in a more strict way than before
25 lines
368 B
Nim
25 lines
368 B
Nim
discard """
|
|
cmd: "nim c -d:useGcAssert $file"
|
|
output: '''running someProc(true)
|
|
res: yes
|
|
yes
|
|
running someProc(false)
|
|
res:
|
|
|
|
'''
|
|
"""
|
|
|
|
proc someProc(x:bool):cstring =
|
|
var res:string = ""
|
|
if x:
|
|
res = "yes"
|
|
echo "res: ", res
|
|
GC_ref(res)
|
|
result = res
|
|
|
|
echo "running someProc(true)"
|
|
echo someProc(true)
|
|
|
|
echo "running someProc(false)"
|
|
echo someProc(false)
|