Merge branch 'master' into vm2

This commit is contained in:
Araq
2013-12-13 15:58:03 +01:00
33 changed files with 28859 additions and 234 deletions

18
tests/system/params.nim Normal file
View File

@@ -0,0 +1,18 @@
import os
import osproc
import parseopt2
import sequtils
let argv = commandLineParams()
if argv == @[]:
# this won't work with spaces
assert execShellCmd(getAppFilename() & " \"foo bar\" --aa:bar=a --a=c:d --ab -c --a[baz]:doo") == 0
else:
let f = toSeq(getopt())
echo f.repr
assert f[0].kind == cmdArgument and f[0].key == "foo bar" and f[0].val == ""
assert f[1].kind == cmdLongOption and f[1].key == "aa" and f[1].val == "bar=a"
assert f[2].kind == cmdLongOption and f[2].key == "a=c" and f[2].val == "d"
assert f[3].kind == cmdLongOption and f[3].key == "ab" and f[3].val == ""
assert f[4].kind == cmdShortOption and f[4].key == "c" and f[4].val == ""

View File

@@ -11,7 +11,7 @@
import
parseutils, strutils, pegs, os, osproc, streams, parsecfg, browsers, json,
marshal, cgi, parseopt, caasdriver
marshal, cgi, parseopt #, caas
const
cmdTemplate = r"nimrod cc --hints:on $# $#"
@@ -364,10 +364,10 @@ proc outputJSON(reject, compile, run: TResults) =
var s = pretty(doc)
writeFile(jsonFile, s)
proc runCaasTests(r: var TResults) =
for test, output, status, mode in caasTestsRunner():
r.addResult(test, "", output & "-> " & $mode,
if status: reSuccess else: reOutputsDiffer)
# proc runCaasTests(r: var TResults) =
# for test, output, status, mode in caasTestsRunner():
# r.addResult(test, "", output & "-> " & $mode,
# if status: reSuccess else: reOutputsDiffer)
proc main() =
os.putenv "NIMTEST_NO_COLOR", "1"
@@ -411,7 +411,7 @@ proc main() =
writeResults(runJson, r)
of "special":
runSpecialTests(r, p.cmdLineRest.string)
runCaasTests(r)
# runCaasTests(r)
writeResults(runJson, r)
of "rodfiles":
runRodFiles(r, p.cmdLineRest.string)