summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/js/t11697.nim5
-rw-r--r--tests/js/temptyseq.nim8
-rw-r--r--tests/stdlib/tunidecode.nim2
-rw-r--r--tests/tuples/t12892.nim8
4 files changed, 23 insertions, 0 deletions
diff --git a/tests/js/t11697.nim b/tests/js/t11697.nim
new file mode 100644
index 000000000..967752586
--- /dev/null
+++ b/tests/js/t11697.nim
@@ -0,0 +1,5 @@
+import tables
+
+var xs: Table[int, Table[int, int]]
+
+doAssertRaises(KeyError): reset xs[0]
diff --git a/tests/js/temptyseq.nim b/tests/js/temptyseq.nim
new file mode 100644
index 000000000..df4b3e8da
--- /dev/null
+++ b/tests/js/temptyseq.nim
@@ -0,0 +1,8 @@
+# #12671
+
+proc foo =
+  var x: seq[int]
+  doAssertRaises(IndexError):
+    inc x[0]
+
+foo()
diff --git a/tests/stdlib/tunidecode.nim b/tests/stdlib/tunidecode.nim
index 689453c76..576bfa2cb 100644
--- a/tests/stdlib/tunidecode.nim
+++ b/tests/stdlib/tunidecode.nim
@@ -5,6 +5,8 @@ discard """
 
 import unidecode
 
+import std/unidecode # #14112
+
 loadUnidecodeTable("lib/pure/unidecode/unidecode.dat")
 
 #assert unidecode("\x53\x17\x4E\xB0") == "Bei Jing"
diff --git a/tests/tuples/t12892.nim b/tests/tuples/t12892.nim
new file mode 100644
index 000000000..d69e99c7f
--- /dev/null
+++ b/tests/tuples/t12892.nim
@@ -0,0 +1,8 @@
+discard """
+  disabled: i386
+"""
+
+template works[T](): auto = T.high - 1
+template breaks[T](): auto = (T.high - 1, true)
+doAssert $works[uint]() == "18446744073709551614"
+doAssert $breaks[uint]() == "(18446744073709551614, true)"