Using string resources in conformance tests.
Michael Mc Donnell
michael at mcdonnell.dk
Sat Jun 26 07:27:01 CDT 2010
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
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?
Michael Mc Donnell
More information about the wine-devel