summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/stdlib/tmemfiles2.nim2
-rw-r--r--tests/vm/tsimpleglobals.nim16
-rw-r--r--tests/vm/twrongconst.nim2
3 files changed, 19 insertions, 1 deletions
diff --git a/tests/stdlib/tmemfiles2.nim b/tests/stdlib/tmemfiles2.nim
index 28af3296a..026443e93 100644
--- a/tests/stdlib/tmemfiles2.nim
+++ b/tests/stdlib/tmemfiles2.nim
@@ -1,8 +1,10 @@
 discard """
   file: "tmemfiles2.nim"
+  disabled: true
   output: '''Full read size: 20
 Half read size: 10 Data: Hello'''
 """
+# doesn't work on windows. fmReadWrite doesn't create a file.
 import memfiles, os
 var
   mm, mm_full, mm_half: MemFile
diff --git a/tests/vm/tsimpleglobals.nim b/tests/vm/tsimpleglobals.nim
new file mode 100644
index 000000000..27bfdce50
--- /dev/null
+++ b/tests/vm/tsimpleglobals.nim
@@ -0,0 +1,16 @@
+discard """
+  msg: "abc xyz bb"
+"""
+
+# bug #2473
+type
+  Test = tuple[a,b: string]
+
+static:
+  var s:seq[Test] = @[(a:"a", b:"b")]
+  s[0] = (a:"aa", b:"bb")
+
+  var x: Test
+  x.a = "abc"
+  x.b = "xyz"
+  echo x.a, " ", x.b, " ", s[0].b
diff --git a/tests/vm/twrongconst.nim b/tests/vm/twrongconst.nim
index 68ab2757c..424ed080e 100644
--- a/tests/vm/twrongconst.nim
+++ b/tests/vm/twrongconst.nim
@@ -1,6 +1,6 @@
 discard """
   errormsg: "cannot evaluate at compile time: x"
-  line: 9
+  line: 7
 """
 
 var x: array[100, char]