more tests are green

This commit is contained in:
Araq 2013-12-08 01:47:07 +01:00
commit 29357ab556
6 changed files with 54 additions and 80 deletions

View file

@ -14,15 +14,15 @@ import os, parseutils, strutils
when not defined(windows):
type
TConverter = object {.pure, final.}
TConverter = object
PConverter* = ptr TConverter ## can convert between two character sets
else:
type
TCodePage = distinct int32
PConverter* = object {.pure.}
PConverter* = object
dest, src: TCodePage
type
EInvalidEncoding* = object of EInvalidValue ## exception that is raised
## for encoding errors
@ -425,7 +425,7 @@ else:
dst = cast[cstring](cast[int](cstring(result)) + offset)
outLen = len(result) - offset
else:
OSError()
OSError(lerr.TOSErrorCode)
# iconv has a buffer that needs flushing, specially if the last char is
# not '\0'
discard iconv(c, nil, nil, dst, outlen)