more tests fixed

This commit is contained in:
Arne Döring 2018-11-16 12:43:05 +01:00 • committed by Araq
commit 534601637a
6 changed files with 24 additions and 5 deletions

View file

@ -33,4 +33,3 @@ when not defined(createNimRtl):
import import
parseutils, strutils, parseopt, parsecfg, strtabs, unicode, pegs, ropes, parseutils, strutils, parseopt, parsecfg, strtabs, unicode, pegs, ropes,
os, osproc, times os, osproc, times

View file

@ -531,7 +531,6 @@ proc processCategory(r: var TResults, cat: Category, options: string) =
else: else:
var testsRun = 0 var testsRun = 0
for name in os.walkFiles("tests" & DirSep &.? cat.string / "t*.nim"): for name in os.walkFiles("tests" & DirSep &.? cat.string / "t*.nim"):
echo name
testSpec r, makeTest(name, options, cat) testSpec r, makeTest(name, options, cat)
inc testsRun inc testsRun
if testsRun == 0: if testsRun == 0:

View file

@ -1,3 +1,7 @@
discard """
action: compile
"""
# This file is prefixed with an "a", because other tests # This file is prefixed with an "a", because other tests
# depend on it and it must be compiled first. # depend on it and it must be compiled first.
import strutils import strutils

View file

@ -1,6 +1,14 @@
discard """
output: "14"
"""
import memfiles import memfiles
var inp = memfiles.open("tests/stdlib/tmemlinesBuf.nim") var inp = memfiles.open("tests/stdlib/tmemlinesBuf.nim")
var buffer: TaintedString = "" var buffer: TaintedString = ""
var lineCount = 0
for line in lines(inp, buffer): for line in lines(inp, buffer):
echo("#" & line & "#") lineCount += 1
close(inp) close(inp)
echo lineCount

View file

@ -1,3 +1,7 @@
discard """
outputsub: ""
"""
import nativesockets, unittest import nativesockets, unittest
suite "nativesockets": suite "nativesockets":
@ -5,4 +9,3 @@ suite "nativesockets":
let hostname = getHostname() let hostname = getHostname()
check hostname.len > 0 check hostname.len > 0
check hostname.len < 64 check hostname.len < 64

View file

@ -1,4 +1,10 @@
# Test the new parseopt module discard """
disabled: true
"""
# this file has a type in the name, and it does not really test
# parseopt module, because tester has no support to set arguments. Test the
# new parseopt module. Therefore it is disabled.
import import
parseopt parseopt