summary refs log tree commit diff stats
path: root/nimsuggest/tests/tdot4.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2017-03-10 11:29:16 +0100
committerAndreas Rumpf <rumpf_a@web.de>2017-03-10 11:29:16 +0100
commit68181e6da2ee22ad3411cd55f1c8b04df3d375cb (patch)
tree2bc8631b40e0c7e3f694892a50da0303e858a71c /nimsuggest/tests/tdot4.nim
parentdb888475dcbd9d5a138ff191bdf3e188d750805f (diff)
downloadNim-68181e6da2ee22ad3411cd55f1c8b04df3d375cb.tar.gz
nimsuggest: maxresults limit; fixed local symbol usages priorizations
Diffstat (limited to 'nimsuggest/tests/tdot4.nim')
-rw-r--r--nimsuggest/tests/tdot4.nim16
1 files changed, 16 insertions, 0 deletions
diff --git a/nimsuggest/tests/tdot4.nim b/nimsuggest/tests/tdot4.nim
new file mode 100644
index 000000000..3d98f9132
--- /dev/null
+++ b/nimsuggest/tests/tdot4.nim
@@ -0,0 +1,16 @@
+discard """
+$nimsuggest --tester --maxresults:2 $file
+>sug $1
+sug;;skProc;;tdot4.main;;proc (inp: string): string;;$file;;10;;5;;"";;100;;None
+sug;;skProc;;strutils.replace;;proc (s: string, sub: string, by: string): string{.noSideEffect, gcsafe, locks: 0.};;$lib/pure/strutils.nim;;1497;;5;;"Replaces `sub` in `s` by the string `by`.";;100;;None
+"""
+
+import strutils
+
+proc main(inp: string): string =
+  # use replace here and see if it occurs in the result, it should gain
+  # priority:
+  result = inp.replace(" ", "a").replace("b", "c")
+
+
+echo "string literal here".#[!]#