require errormsg to be specified before file.
This commit is contained in:
parent
ca394ebd95
commit
1105d03644
264 changed files with 305 additions and 623 deletions
|
|
@ -1,14 +1,14 @@
|
|||
discard """
|
||||
file: "tdomulttest.nim"
|
||||
output: "555\ntest\nmulti lines\n99999999\nend"
|
||||
disabled: true
|
||||
"""
|
||||
|
||||
proc foo(bar, baz: proc (x: int): int) =
|
||||
echo bar(555)
|
||||
echo baz(99999999)
|
||||
|
||||
foo do (x: int) -> int:
|
||||
return x
|
||||
|
||||
do (x: int) -> int:
|
||||
echo("test")
|
||||
echo("multi lines")
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
discard """
|
||||
errormsg: "expected: ':', but got: 'echo'"
|
||||
file: "tinvcolonlocation1.nim"
|
||||
line: 8
|
||||
column: 7
|
||||
errormsg: "expected: ':', but got: 'echo'"
|
||||
"""
|
||||
try #<- missing ':'
|
||||
echo "try"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
discard """
|
||||
errormsg: "expected: ':', but got: 'keyword finally'"
|
||||
file: "tinvcolonlocation2.nim"
|
||||
line: 11
|
||||
column: 8
|
||||
errormsg: "expected: ':', but got: 'keyword finally'"
|
||||
"""
|
||||
try:
|
||||
echo "try"
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
discard """
|
||||
errormsg: "expected: ':', but got: 'echo'"
|
||||
file: "tinvcolonlocation3.nim"
|
||||
line: 12
|
||||
column: 7
|
||||
errormsg: "expected: ':', but got: 'echo'"
|
||||
"""
|
||||
try:
|
||||
echo "try"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
discard """
|
||||
errormsg: "invalid indentation"
|
||||
file: "tinvwhen.nim"
|
||||
line: 11
|
||||
errormsg: "invalid indentation"
|
||||
"""
|
||||
# This was parsed even though it should not!
|
||||
|
||||
|
|
@ -11,5 +11,3 @@ proc getcwd(buf: cstring, buflen: cint): cstring
|
|||
when defined(unix): {.importc: "getcwd", header: "<unistd.h>".} #ERROR_MSG invalid indentation
|
||||
elif defined(windows): {.importc: "getcwd", header: "<direct.h>"}
|
||||
else: {.error: "os library not ported to your OS. Please help!".}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
discard """
|
||||
file: "toprprec.nim"
|
||||
output: "done"
|
||||
"""
|
||||
# Test operator precedence:
|
||||
|
|
|
|||
|
|
@ -1,9 +1,3 @@
|
|||
discard """
|
||||
file: "ttupleunpack.nim"
|
||||
output: ""
|
||||
exitcode: 0
|
||||
"""
|
||||
|
||||
proc returnsTuple(): (int, int, int) = (4, 2, 3)
|
||||
|
||||
proc main2 =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue