summary refs log tree commit diff stats
path: root/tests/manyloc/standalone/barebone.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/manyloc/standalone/barebone.nim')
-rw-r--r--tests/manyloc/standalone/barebone.nim9
1 files changed, 8 insertions, 1 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")