Hi wine developers!
I've written a conformance test (my first) for bug 17986: BrsFolder_OnCommand make new folder not implemented. The conformance test tests if clicking on the "Make New Folder" button in a SHBrowseForFolder dialog box results in creation of a new folder. I want the test to be localized and work across all newer versions of Windows, but I'm having trouble with it.
I use the LoadString function to get the "New folder" string from shell32.dll that is used for creating a new folder. The problem is that the location where it is stored in shell32.dll varies between the different versions of Windows. I can only make the test work on one version at a time. Even the capitalization varies between the different versions of Windows, i.e. "New Folder" vs. "New folder".
My question is how should we handle a problem like the one mentioned above? Should we avoid using string resources in conformance test, or should we try to handle the version issues? One solution would be to hard code the string instead of loading it from a resource. This would, however, mean that the test would be skipped on all non-English versions of windows, and it would additionally have to ignore the capitalization differences. Another solution would be to get the string according to the version of Windows. This would, however, pose a problem in wine because it does not emulate any specific Windows version. The location of the string in wine's shell32.dll does not match any version of Windows, and we would therefore also have to detect if the test is running on wine.
Has anyone bumped into the same problem, or does anyone know a thread about this on wine-devel? Do you have any comments on what to do?
Thanks, Michael Mc Donnell
Hi Michael,
I use the LoadString function to get the "New folder" string from shell32.dll that is used for creating a new folder. The problem is that the location where it is stored in shell32.dll varies between the different versions of Windows. I can only make the test work on one version at a time. Even the capitalization varies between the different versions of Windows, i.e. "New Folder" vs. "New folder".
It appears as though you shouldn't be doing this in a conformance test. It varies enough that applications can't depend on the resource ID or string value being the same in different versions of Windows. Our conformance tests try to test for invariants across Windows versions, i.e. behavior that applications may depend on or expect.
You might check the contents of the containing folder before and after the command is executed, and make sure that at least one new folder exists after the command is executed. --Juan
Thanks for taking the time to write a comment Juan.
On Tue, Jun 29, 2010 at 5:55 PM, Juan Lang juan.lang@gmail.com wrote:
Hi Michael,
I use the LoadString function to get the "New folder" string from shell32.dll that is used for creating a new folder. The problem is that the location where it is stored in shell32.dll varies between the different versions of Windows. I can only make the test work on one version at a time. Even the capitalization varies between the different versions of Windows, i.e. "New Folder" vs. "New folder".
It appears as though you shouldn't be doing this in a conformance test. It varies enough that applications can't depend on the resource ID or string value being the same in different versions of Windows. Our conformance tests try to test for invariants across Windows versions, i.e. behavior that applications may depend on or expect.
Yeah that sounds reasonable. I guess it means there will be very few Windows applications that depend on the folder getting the correct "New folder" name and we can therefore ignore this issue.
You might check the contents of the containing folder before and after the command is executed, and make sure that at least one new folder exists after the command is executed.
Super, my test already does this. I'll cut out the resource handling part and clean the patch up so it will be ready for when the code freeze is lifted.
Michael Mc Donnell