Adds more idetools suggest failure cases.
This commit is contained in:
parent
ebd45529c1
commit
4583c4ea0a
2 changed files with 32 additions and 0 deletions
|
|
@ -1,7 +1,13 @@
|
||||||
main.nim
|
main.nim
|
||||||
|
# This example shows how the suggest feature can be used on a partial file
|
||||||
|
# using the --trackDirty switch.
|
||||||
> idetools --trackDirty:main_dirty.nim,$TESTNIM,12,7 --suggest $SILENT
|
> idetools --trackDirty:main_dirty.nim,$TESTNIM,12,7 --suggest $SILENT
|
||||||
skField\tx
|
skField\tx
|
||||||
skField\ty
|
skField\ty
|
||||||
|
# Repeating the query in caas should work always and retrieve same output.
|
||||||
|
CaasRun > idetools --trackDirty:main_dirty.nim,$TESTNIM,12,7 --suggest $SILENT
|
||||||
|
CaasRun skField\tx
|
||||||
|
CaasRun skField\ty
|
||||||
> c --verbosity:0 --hints:on
|
> c --verbosity:0 --hints:on
|
||||||
SuccessX
|
SuccessX
|
||||||
|
|
||||||
|
|
|
||||||
26
tests/caas/suggest-invalid-source.txt
Normal file
26
tests/caas/suggest-invalid-source.txt
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
main_dirty.nim
|
||||||
|
# A variant of the suggest-compile.txt, instead of using a "base" correct
|
||||||
|
# source, this one uses the "broken" main_dirty.nim which won't compile. The
|
||||||
|
# test tries to stress idetools to still provide a valid answer if possible,
|
||||||
|
# and at least provide the same output with repeated queries rather than dying
|
||||||
|
# after the first compilation error.
|
||||||
|
|
||||||
|
# The first query should work and provide valid suggestions.
|
||||||
|
> idetools --track:$TESTNIM,12,6 --suggest $SILENT
|
||||||
|
skField\tx
|
||||||
|
skField\ty
|
||||||
|
|
||||||
|
# Repeating the query should work too.
|
||||||
|
> idetools --track:$TESTNIM,12,6 --suggest $SILENT
|
||||||
|
skField\tx
|
||||||
|
skField\ty
|
||||||
|
|
||||||
|
# Expect now a compilation failure.
|
||||||
|
> c
|
||||||
|
!SuccessX
|
||||||
|
invalid indentation
|
||||||
|
|
||||||
|
# Repeating suggestions *after broken compilation* should work too.
|
||||||
|
> idetools --track:$TESTNIM,12,6 --suggest $SILENT
|
||||||
|
skField\tx
|
||||||
|
skField\ty
|
||||||
Loading…
Add table
Add a link
Reference in a new issue