summary refs log tree commit diff stats
path: root/nimsuggest/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-03-14 11:21:35 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-03-14 11:21:35 +0100
commitb414806e66efbf37c8e7edf832cb9a266f433d60 (patch)
treedca6c5444374865ea90b26c084327f9bbc1fa792 /nimsuggest/tests
parentf162ff7773c01cc0eb7f193ff3a075b48aad75b2 (diff)
downloadNim-b414806e66efbf37c8e7edf832cb9a266f433d60.tar.gz
nimsuggest: suggest types in a type section
Diffstat (limited to 'nimsuggest/tests')
-rw-r--r--nimsuggest/tests/ttype_decl.nim15
1 files changed, 15 insertions, 0 deletions
diff --git a/nimsuggest/tests/ttype_decl.nim b/nimsuggest/tests/ttype_decl.nim
new file mode 100644
index 000000000..846eb7b1b
--- /dev/null
+++ b/nimsuggest/tests/ttype_decl.nim
@@ -0,0 +1,15 @@
+discard """
+$nimsuggest --tester --maxresults:3 $file
+>sug $1
+sug;;skType;;ttype_decl.Other;;Other;;$file;;10;;2;;"";;0;;None
+sug;;skType;;system.int;;int;;$lib/system.nim;;25;;2;;"";;0;;None
+sug;;skType;;system.string;;string;;$lib/system.nim;;48;;2;;"";;0;;None
+"""
+import strutils
+type
+  Other = object ## My other object.
+  Foo = #[!]#
+
+proc main(f: Foo) =
+
+# XXX why no doc comments?