diff options
author | Araq <rumpf_a@web.de> | 2011-10-22 22:49:51 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-10-22 22:49:51 +0200 |
commit | dce8d3d1ab4167c134748108ff66251fe5ca7d7c (patch) | |
tree | f571abacf75297d6774b1b2e4ca510609aeab3a2 /tests/rodfiles | |
parent | 235bd1c47402a62db097a0bae7d63224b46d02d8 (diff) | |
download | Nim-dce8d3d1ab4167c134748108ff66251fe5ca7d7c.tar.gz |
rod files: next trivial examples working
Diffstat (limited to 'tests/rodfiles')
-rw-r--r-- | tests/rodfiles/tester.nim | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/rodfiles/tester.nim b/tests/rodfiles/tester.nim new file mode 100644 index 000000000..d2b5a1581 --- /dev/null +++ b/tests/rodfiles/tester.nim @@ -0,0 +1,30 @@ +# +# +# Nimrod Tester +# (c) Copyright 2011 Andreas Rumpf +# +# See the file "copying.txt", included in this +# distribution, for details about the copyright. +# + +## This program tests Nimrod's ROD file mechanism. + +import + parseutils, strutils, pegs, os, osproc, streams, parsecfg, browsers, json, + marshal, cgi + +const + cmdTemplate = r"nimrod cc --hints:on $# $#" + resultsFile = "testresults.html" + jsonFile = "testresults.json" + Usage = "usage: tester reject|compile|examples|run|merge [nimrod options]" + +proc myExec(cmd: string): string = + result = osproc.execProcess(cmd) + +var + pegLineError = peg"{[^(]*} '(' {\d+} ', ' \d+ ') Error:' \s* {.*}" + pegOtherError = peg"'Error:' \s* {.*}" + pegSuccess = peg"'Hint: operation successful'.*" + pegOfInterest = pegLineError / pegOtherError / pegSuccess + |