On Sun, 25 Jan 2009 23:00:57 +0100 Magnus wrote:
MF> I have made some characterizing tests of copy_nword in order to change
MF> it and what I have found is the following:
MF> 
MF>       * The return value is NULL on error OR on last argument so it is
MF>         impossible to distinguish those cases. 
MF>       * Quoting is handled somewhat confusingly - an input of "\"The
MF>         \"red" will give two tokens, "The" and "red" but an input of
MF>         "The\"red\"" will give just one token, "The\"red\"", of course a
MF>         less evil input of "\"The\" red" will give two tokens, "The" and
MF>         "red" so it seems as if start of string is checked only on
MF>         string start. 
MF>       * Unterminated quotes are not reported, the leading quote is just
MF>         stripped away. 
MF>       * Overlong tokens are silently truncated. 
MF>       * A trailing escape character is silently ignored.
MF> 
MF> I think all of the above points a little peculiar - are they all
MF> intentional?

I would think not.

MF> Should all of this be added to the documentation of copy_nword?

I think all but the second seem like bugs, and should probably be fixed.

MF> (Attached is my characterizing test program. I would like to commit them
MF> but I am not sure where to put them, neither the files nor in the make
MF> hierarchy. Should they be in testing? Should they run from make test? If
MF> not, what should they run from? make check?)

Good question... We should probably come up with a good location. I know there
are some test programs scattered around (e.g. snmplib/test_binary_array.c),
but there should probably be a central location... Not sure exactly where it
should be, though..

------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to