summary refs log tree commit diff stats
path: root/tests/caas/suggest-invalid-source.txt
diff options
context:
space:
mode:
authorGrzegorz Adam Hankiewicz <gradha@imap.cc>2013-07-06 16:51:32 +0200
committerGrzegorz Adam Hankiewicz <gradha@imap.cc>2013-07-06 16:51:55 +0200
commit4583c4ea0a9dbf8805b0e84f21a9ecd7da68146d (patch)
tree4c13c9d54c4bcda6bd56b9779c9728d77c198d2a /tests/caas/suggest-invalid-source.txt
parentebd45529c169dbdc6fca919230f5f7f2fbf9b760 (diff)
downloadNim-4583c4ea0a9dbf8805b0e84f21a9ecd7da68146d.tar.gz
Adds more idetools suggest failure cases.
Diffstat (limited to 'tests/caas/suggest-invalid-source.txt')
-rw-r--r--tests/caas/suggest-invalid-source.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/caas/suggest-invalid-source.txt b/tests/caas/suggest-invalid-source.txt
new file mode 100644
index 000000000..7f8f1213d
--- /dev/null
+++ b/tests/caas/suggest-invalid-source.txt
@@ -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