summary refs log tree commit diff stats
path: root/tests/accept/compile/tstrtabs.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/accept/compile/tstrtabs.nim')
-rw-r--r--tests/accept/compile/tstrtabs.nim12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/accept/compile/tstrtabs.nim b/tests/accept/compile/tstrtabs.nim
new file mode 100644
index 000000000..299db609d
--- /dev/null
+++ b/tests/accept/compile/tstrtabs.nim
@@ -0,0 +1,12 @@
+import strtabs
+
+var tab = newStringTable(["key1", "val1", "key2", "val2"], 
+                         modeStyleInsensitive)
+for i in 0..80:
+  tab["key_" & $i] = "value" & $i
+  
+for key, val in pairs(tab):
+  writeln(stdout, key, ": ", val)
+writeln(stdout, "length of table ", $tab.len)
+
+writeln(stdout, `%`("$key1 = $key2; ${PATH}", tab, {useEnvironment}))