"Joshua Thielen" joshua_thielen@yahoo.com wrote:
What do you think about cases 10 and 11 in WritePrivateProfileSection where the section name is [Strange 2]? If this section name is added twice, windows does not replace the section as is expected but instead adds a duplicate [Strange 2] section. I thought this case was interesting, but I wasn't sure if it should be tested in wine.
I think your approach is completely valid. Wine regression tests should contain as much as possible various wild tests. You know, Windows applications are very unpredictable beasts :-) due to missing or misleading API documentation.
I also have the following failures under win2k:
Number of bytes read do not match FAIL: c:\result.ini does not match compare1.ini Number of bytes read do not match FAIL: c:\result.ini does not match compare2.ini
I originally wrote the test in windows, but I'm afraid something might have changed when I ported it from windows to wine test code. How do you compile and run the tests under windows?
Using the attached patch. Since I was working on some other tests, I borrowed some code snippets from Wine test suite to not depend on the Wine testing environment and make my tests easily adjustable for Wine.
What I miss in the current Wine test framework are: a) tests, expected to fail under some circumstances b) portable use of structured exception handling to test the cases which might or should crash.
If you like, you can comment out the lines with DeleteFileA("c:\result.ini") and then comment out either test_WritePrivateProfileString or test_WritePrivateProfileSection from the START_TEST function to see the result.ini that is supposed to match compare1.ini or compare2.ini, respectively.
Yes, I cursory looked at them, but haven't enough time yet to find the source of problem.
After looking at the code again (with rested eyes), I think that I might be missing some tests that I intended to put in and I definitely have a few typos. If you see anything else that needs to be added or changed, please let me know.
Sure, when I'll find some more time.