Skip to Content.
Sympa Menu

freetds - Re: [freetds] One failing unit test (iconv_read) on git master on OS X

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] One failing unit test (iconv_read) on git master on OS X
  • Date: Sun, 15 Sep 2013 09:15:20 +0100

2013/9/14 Marc Abramowitz <marca AT surveymonkey.com>:
> The weird thing is that the test is complaining about out_len being 1024
> bytes instead of 4077:
>
> marca@marca-mac:~/dev/git-repos/freetds$ cat
> src/tds/unittests/iconv_fread.log
> out 1024 bytes expected 4077
> res 0 out_len 1024
>
> But the output file has 4077 "a" characters (and then a space and two
> exclamation points):
>
> marca@marca-mac:~/dev/git-repos/freetds$ wc -c
> src/tds/unittests/iconv_fread.out
> 4080 src/tds/unittests/iconv_fread.out
> marca@marca-mac:~/dev/git-repos/freetds$ cat
> src/tds/unittests/iconv_fread.out
> aaaaaa… !!
>
> which looks like it might be correct.


Just looked at test. The test write the file then try to read back
with tds_bcp_read. The content is ok (lot of 'a' followed by a no
blank space and two exclamation points which are the terminator). The
fact that function returns only 1024 is wrong should return length of
'a' plus 1 (the space converted to iso8859-1).

For the dump probably you don't get cause there are no server
connection, try to add a line like

tdsdump_open("stderr");

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page