[freetds] unittest/setnull.c passes

James K. Lowden jklowden at freetds.org
Tue Dec 11 10:25:51 EST 2007


ZIGLIO, Frediano, VF-IT wrote:
> > unittest/null.c and unittest/null2.c fail on Sybase servers because
> > there's no NTEXT or NVARCHAR(MAX).  
> > 
> 
> No, these kind of errors are ignored. However the test isn't able to
> distinguish if server return differently empty strings and NULLs...
> Sybase cannot store empty string so it returns empty strings as ' '.

Hi Freddy, 

There's so much noise in the output that I couldn't see what was expected
and what failed.  

I mostly like your new tests.  They're modular, generally easy to extend
(even if they're sometimes hard to pass!).  And it's *great* to have
someone other than the guy writing the feature write the test.  But would
it be OK to say the output is sometimes not very helpful?  

I like output to be pretty quiet until something goes wrong.  Something
like:

Trying A ... ok
Trying B ... ok
Trying C ... 
error: file:line: message expected C, got X.

When I get a chance (or if you do), I'd like to change the null tests not
to use the "OK anticipated error receive" feature.  I added that feature
to test provoking errors: If I do X, does the library emit msgno Y?   It's
not for ignoring messages because a server doesn't support a datatype.  We
have DBTDS() for that.  

BTW, I looked for something like dbsetnull() in ODBC.  Didn't find
anything.  Does it exist?  

Regards, 

--jkl



More information about the FreeTDS mailing list