Skip to content

Commit 72d5c3f

Browse files
committed
works
1 parent fec0fc0 commit 72d5c3f

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

nimsuggest/tester.nim

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
# `nim r nimsuggest/tester.nim nimsuggest/tests/tsug_accquote.nim`
77

88
import os, osproc, strutils, streams, re, sexp, net
9+
from sequtils import toSeq
910

1011
type
1112
Test = object
@@ -336,8 +337,9 @@ proc main() =
336337
failures += runTest(xx)
337338
failures += runEpcTest(xx)
338339
else:
339-
for x in walkFiles(tpath / "t*.nim"):
340-
echo "Test ", x
340+
let files = toSeq(walkFiles(tpath / "t*.nim"))
341+
for i, x in files:
342+
echo ("Test ", x, i, files.len)
341343
when defined(i386):
342344
if x == "nimsuggest/tests/tmacro_highlight.nim":
343345
echo "skipping" # workaround bug #17945

nimsuggest/tests/tsug_accquote.nim

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
proc `%%%`(a: int) = discard
22
proc `cast`() = discard
3-
proc `gook1`(a: int) = discard
4-
proc gook2(a: int) = discard
3+
proc `zook1`(a: int) = discard
4+
proc zook2(a: int) = discard
55
tsug_accquote.#[!]#
66

77
# ## foo # this would remove the bug
@@ -13,8 +13,8 @@ $nimsuggest --tester $file
1313
>sug $1
1414
sug;;skProc;;tsug_accquote.`%%%`;;proc (a: int);;$file;;1;;5;;"";;100;;None
1515
sug;;skProc;;tsug_accquote.`cast`;;proc ();;$file;;2;;5;;"";;100;;None
16-
sug;;skProc;;tsug_accquote.gook1;;proc (a: int);;$file;;3;;5;;"";;100;;None
17-
sug;;skProc;;tsug_accquote.gook2;;proc (a: int);;$file;;4;;5;;"";;100;;None
16+
sug;;skProc;;tsug_accquote.zook1;;proc (a: int);;$file;;3;;5;;"";;100;;None
17+
sug;;skProc;;tsug_accquote.zook2;;proc (a: int);;$file;;4;;5;;"";;100;;None
1818
"""
1919

2020
#[
@@ -25,5 +25,5 @@ What happens is that after removing `cursorMarker`, the code nim sees is:
2525
`tsug_accquote.discard """ ... """`
2626
which then gets (without the hack) transformed into `result = errorNode(c, n)`
2727
28-
What's not clear is why `gook1`, `gook2` get listed in suggestions but not the other ones.
28+
What's not clear is why `zook1`, `zook2` get listed in suggestions but not the other ones.
2929
]#

0 commit comments

Comments
 (0)