From 4864447ba4e9541f8987232ca3c3e611f0e69ede Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Sat, 4 May 2013 02:17:52 +0300 Subject: adding some failing caas tests --- tests/caas/compile-then-def.txt | 9 +++++++++ tests/caas/def-then-compile.txt | 7 +++++++ tests/caasdriver.nim | 7 +++++-- 3 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 tests/caas/compile-then-def.txt create mode 100644 tests/caas/def-then-compile.txt (limited to 'tests') diff --git a/tests/caas/compile-then-def.txt b/tests/caas/compile-then-def.txt new file mode 100644 index 000000000..a5080c50d --- /dev/null +++ b/tests/caas/compile-then-def.txt @@ -0,0 +1,9 @@ +main.nim +> c +SuccessX +> idetools --track:main.nim,5,18 --def main.nim +strutils.toUpper +SuccessX +> idetools --track:main.nim,5,18 --def main.nim +strutils.toUpper +SuccessX diff --git a/tests/caas/def-then-compile.txt b/tests/caas/def-then-compile.txt new file mode 100644 index 000000000..efa4dcbb3 --- /dev/null +++ b/tests/caas/def-then-compile.txt @@ -0,0 +1,7 @@ +main.nim +> idetools --track:main.nim,5,18 --def main.nim +strutils.toUpper +SuccessX +> c +SuccessX + diff --git a/tests/caasdriver.nim b/tests/caasdriver.nim index ee2e5b571..3f3d3671e 100644 --- a/tests/caasdriver.nim +++ b/tests/caasdriver.nim @@ -6,8 +6,8 @@ type proc dirname(path: string): string = path.splitPath()[0] -const - TesterDir = CurrentSourcePath.dirname +var + TesterDir = getAppDir() NimrodBin = TesterDir / "../bin/nimrod" proc startNimrodSession*(project: string): TNimrodSession = @@ -26,6 +26,9 @@ proc doCommand*(session: var TNimrodSession, command: string): string = if session.nim.outputStream.readLine(line): if line.string == "": break result.add(line.string & "\n") + else: + result = "FAILED TO EXECUTE: " & command & "\n" & result + break proc close(session: var TNimrodSession) {.destructor.} = session.nim.close -- cgit 1.4.1-2-gfad0