[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [stellation-res] SvcConnectTest: assertion of 'true' and 'true\n'!
|
On Thu, Aug 01, 2002 at 08:31:33PM +0100, Ringo De Smet wrote:
> Hello Florin,
>
> --- Florin Iucha <florin@xxxxxxxxx> wrote:
> > The StringTokenizer created at line 61 eats that newline. That
> > StringTokenizer breaks the program output in lines.
>
> I found the problem. The newline character ('\n') is defined as a
> Line-Feed charachter (ASCII character 10). I suspect that everyone in
> the Stellation team except me runs on Unix systems where semantically,
> a newline is just an LF, while on Windows it's the combination of CR +
> LF (ASCII 13 + ASCII 10). As a result, the StringTokenizer eats the LF
> but not the CR. In the attached patch, I replaced the use of
> StringTokenizer with a BufferedReader using a StringReader. The
> readLine method of BufferedReader is exactly what I needed to get rid
> of the CR too.
The fix is good but the patch is missing other uses of 'getProgramOutput'.
I will fix it in the next drop.
Thanks,
florin
--
"If it's not broken, let's fix it till it is."
41A9 2BDE 8E11 F1C5 87A6 03EE 34B3 E075 3B90 DFE4
Attachment:
pgpFM7PtGOXsP.pgp
Description: PGP signature