rod files: next trivial examples working
This commit is contained in:
parent
235bd1c474
commit
dce8d3d1ab
13 changed files with 70 additions and 1034 deletions
|
|
@ -1,5 +1,10 @@
|
|||
This directory contains the test cases.
|
||||
Each test must have a filename of the form: ``t*.nim``
|
||||
|
||||
Each test can contain a spec in ``"""``.
|
||||
Each test can contain a spec in a ``discard """"""`` block.
|
||||
|
||||
The folder ``rodfiles`` contains special tests that test incremental
|
||||
compilation via symbol files.
|
||||
|
||||
The folder ``dll`` contains simple DLL tests.
|
||||
|
||||
|
|
|
|||
30
tests/rodfiles/tester.nim
Normal file
30
tests/rodfiles/tester.nim
Normal file
|
|
@ -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
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue