summary refs log tree commit diff stats
path: root/nimsuggest
diff options
context:
space:
mode:
authorSaem Ghani <saemghani+github@gmail.com>2021-01-25 00:52:35 -0800
committerGitHub <noreply@github.com>2021-01-25 09:52:35 +0100
commit0961b5b584be3c0b1c0f8f187732848aee3972b4 (patch)
tree2ec5e9b380aad4d2a4edbdc34cb82c85a2650d9a /nimsuggest
parent8d3e0c7b9bb1289c249b2f009089326794a8a74a (diff)
downloadNim-0961b5b584be3c0b1c0f8f187732848aee3972b4.tar.gz
regression test for nim-lang/nimsuggest#58 (#16817)
Already works this is simply to catch any regressions.
Diffstat (limited to 'nimsuggest')
-rw-r--r--nimsuggest/tests/tuse.nim22
1 files changed, 22 insertions, 0 deletions
diff --git a/nimsuggest/tests/tuse.nim b/nimsuggest/tests/tuse.nim
new file mode 100644
index 000000000..89a9c151a
--- /dev/null
+++ b/nimsuggest/tests/tuse.nim
@@ -0,0 +1,22 @@
+# basic tests for use
+
+# bug #58
+proc someOtherProc() =
+  discard
+
+someOtherProc()
+
+proc #[!]#someProc*() =
+  discard
+
+#[!]#someProc()
+
+discard """
+$nimsuggest --tester $file
+>use $1
+def;;skProc;;tuse.someProc;;proc (){.noSideEffect, gcsafe, locks: 0.};;$file;;9;;5;;"";;100
+use;;skProc;;tuse.someProc;;proc (){.noSideEffect, gcsafe, locks: 0.};;$file;;12;;0;;"";;100
+>use $2
+def;;skProc;;tuse.someProc;;proc (){.noSideEffect, gcsafe, locks: 0.};;$file;;9;;5;;"";;100
+use;;skProc;;tuse.someProc;;proc (){.noSideEffect, gcsafe, locks: 0.};;$file;;12;;0;;"";;100
+"""