summary refs log tree commit diff stats
path: root/tests/vm
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2020-01-12 04:44:43 -0800
committerAndreas Rumpf <rumpf_a@web.de>2020-01-12 13:44:43 +0100
commitee1563ef33795b5ccac37921e3e4771c47c5d3fa (patch)
tree280db57951970a06e2ed9975ecb4720c70cd972f /tests/vm
parent1c001fe583d05ef88a8626dec958bf07d5f23ca4 (diff)
downloadNim-ee1563ef33795b5ccac37921e3e4771c47c5d3fa.tar.gz
VM FFI: write(stderr, msg) and fprintf(cstderr, msg) now work at CT (#13083)
Diffstat (limited to 'tests/vm')
-rw-r--r--tests/vm/tevalffi.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/vm/tevalffi.nim b/tests/vm/tevalffi.nim
index 963d2a58e..c2abdba5d 100644
--- a/tests/vm/tevalffi.nim
+++ b/tests/vm/tevalffi.nim
@@ -8,6 +8,8 @@ foo:102:103
 foo:102:103:104
 foo:0.03:asdf:103:105
 ret={s1:foobar s2:foobar age:25 pi:3.14}
+hello world stderr
+hi stderr
 '''
   output: '''
 foo
@@ -17,6 +19,8 @@ foo:102:103
 foo:102:103:104
 foo:0.03:asdf:103:105
 ret={s1:foobar s2:foobar age:25 pi:3.14}
+hello world stderr
+hi stderr
 '''
   disabled: "true"
 """
@@ -76,6 +80,15 @@ proc fun() =
     if false:
       c_printf("foo2:a=%d\n", a2)
 
+
 static:
   fun()
 fun()
+
+when true:
+  import system/ansi_c
+  proc fun2()=
+    c_fprintf(cstderr, "hello world stderr\n")
+    write(stderr, "hi stderr\n")
+  static: fun2()
+  fun2()