IC navigator: added support for include files (#17784)
* ic fixed navigator crash when track wrong/missed Also fixed an issue with getNimcacheDir not observing the outDir. * closer, but not sure how to test[skip ci][ci skip] * IC navigator: added support for include files * update * make posix happy via expandFilename * update Co-authored-by: Saem Ghani <saemghani+github@gmail.com>
This commit is contained in:
parent
24abe10aa8
commit
3b80f0dc8e
9 changed files with 111 additions and 33 deletions
2
tests/navigator/minclude.nim
Normal file
2
tests/navigator/minclude.nim
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# An include file.
|
||||
foo(3)
|
||||
29
tests/navigator/tincludefile.nim
Normal file
29
tests/navigator/tincludefile.nim
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
discard """
|
||||
cmd: "nim check $options --defusages:$file,12,7 $file"
|
||||
nimout: '''def tincludefile_temp.nim(11, 10)
|
||||
usage tincludefile_temp.nim(12, 8)
|
||||
'''
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
proc foo(x: int) =
|
||||
echo x
|
||||
|
||||
foo(3)
|
||||
echo "yes", 1 != 3
|
||||
|
||||
#!EDIT!#
|
||||
discard """
|
||||
cmd: "nim check $options --defusages:$file/../minclude.nim,2,2 $file"
|
||||
nimout: '''def tincludefile_temp.nim(10, 6)
|
||||
usage minclude.nim(2, 1)
|
||||
'''
|
||||
"""
|
||||
|
||||
|
||||
proc foo(x: int) =
|
||||
echo x
|
||||
|
||||
include minclude
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
discard """
|
||||
cmd: "nim check $options --track:$file,12,7 $file"
|
||||
cmd: "nim check $options --defusages:$file,12,7 $file"
|
||||
nimout: '''def tnav1_temp.nim(11, 10)
|
||||
usage tnav1_temp.nim(12, 8)
|
||||
'''
|
||||
|
|
@ -16,7 +16,7 @@ echo "yes", 1 != 3
|
|||
|
||||
#!EDIT!#
|
||||
discard """
|
||||
cmd: "nim check $options --track:$file,15,2 $file"
|
||||
cmd: "nim check $options --defusages:$file,15,2 $file"
|
||||
nimout: '''def tnav1_temp.nim(12, 6)
|
||||
usage tnav1_temp.nim(15, 1)
|
||||
'''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue