diff options
Diffstat (limited to 'tests/manyloc/standalone')
-rw-r--r-- | tests/manyloc/standalone/barebone.nim | 9 | ||||
-rw-r--r-- | tests/manyloc/standalone/barebone.nim.cfg | 1 | ||||
-rw-r--r-- | tests/manyloc/standalone/panicoverride.nim | 5 |
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/manyloc/standalone/barebone.nim b/tests/manyloc/standalone/barebone.nim index 9d75f8f2e..487f6da65 100644 --- a/tests/manyloc/standalone/barebone.nim +++ b/tests/manyloc/standalone/barebone.nim @@ -1,4 +1,8 @@ - +discard """ +ccodecheck: "\\i !@('systemInit')" +ccodecheck: "\\i !@('systemDatInit')" +output: "hello" +""" # bug #2041: Macros need to be available for os:standalone! import macros @@ -7,3 +11,6 @@ proc printf(frmt: cstring) {.varargs, header: "<stdio.h>", cdecl.} var x = 0 inc x printf("hi %ld\n", x+4777) + +proc substr(a: string): string = a[0 .. 3] # This should compile. See #9762 +const a = substr("foobar") diff --git a/tests/manyloc/standalone/barebone.nim.cfg b/tests/manyloc/standalone/barebone.nim.cfg index bb350ff55..b956bef8e 100644 --- a/tests/manyloc/standalone/barebone.nim.cfg +++ b/tests/manyloc/standalone/barebone.nim.cfg @@ -1,3 +1,2 @@ --os:standalone ---deadCodeElim:on --gc:none diff --git a/tests/manyloc/standalone/panicoverride.nim b/tests/manyloc/standalone/panicoverride.nim index d9b3f4388..c0b8bb030 100644 --- a/tests/manyloc/standalone/panicoverride.nim +++ b/tests/manyloc/standalone/panicoverride.nim @@ -11,9 +11,4 @@ proc panic(s: string) {.noreturn.} = rawoutput(s) exit(1) -# Alternatively we also could implement these 2 here: -# -# proc sysFatal(exceptn: typeDesc, message: string) {.noReturn.} -# proc sysFatal(exceptn: typeDesc, message, arg: string) {.noReturn.} - {.pop.} |