Thomas Kho wrote in http://www.winehq.org/pipermail/wine-patches/2006-February/023959.html :
... fixes bug 4479 (find has a bounds bug). Additionally, this patch adds a conformance test for rich edit with tests for EM_FINDTEXT and EM_FINDTEXTEX.
Tommy, your haystack[] variable is long and complex. Can you get the same testing out of a shorter sample string?
Can you add a comment for each little check, translating it into english?
All your tests seem to use the FR_MATCHCASE and FR_DOWN flags, could you also test without those flags a bit more?
How sure are you about the bugfix? Are there other places in the source where a similar off-by-one error is made?
Otherwise this looks great. - Dan -- Wine for Windows ISVs: http://kegel.com/wine/isv