[AppDB] - unit test for query_parameters(), fix query_parameters()
Chris Morgan
cmorgan at alum.wpi.edu
Tue Jun 27 00:42:16 CDT 2006
I noticed an odd failure in query_parameters() during some testing of a future
sql injection patch yesterday so I figured it would be a good time to
implement a unit test for query_parameters() so its functionality was fully
tested and locked down.
Patch tests success and failure cases of query_parameters() with each of the
special characters, '?', '~', '&', that can be used in place of parameters in
an sql query. Unit test also tests mismatches between the number of tokens
in a query and the number of parameters provided to query_parameters().
Fixes found during testing have been incorporated into query_parameters().
Also start to split out some unit test common functions to test_common.php.
test_common.php and test_db.php are new files that go into /appdb/unit_test
Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_db.php
Type: application/x-php
Size: 4091 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060627/35100eef/test_db.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test_common.php
Type: application/x-php
Size: 140 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060627/35100eef/test_common.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: query_parameters_fixes.patch
Type: text/x-diff
Size: 2607 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20060627/35100eef/query_parameters_fixes.patch
More information about the wine-patches
mailing list