"Uwe Bonnes" bon@elektron.ikp.physik.tu-darmstadt.de wrote:
Please let us know if you find some sensible way to test filesystem functions. What I do now is
- export some filesystem tree with SMB(NCP)
- import it in Vmware with some drive letter
- use the same drive letter in the wine-config for the same filesystem tree
I don't think this solution is very sensible for a more generalized test...
Well, I thought about very simple test case like this one (in C):
#include <assert.h> #include <string.h> #include <windows.h>
int main(void) { UINT len, len_with_null; char buf[MAX_PATH];
strcpy(buf, "foo"); len_with_null = GetSystemDirectory(buf, 1); assert(strcmp(buf, "foo") == 0);
strcpy(buf, "foo"); len = GetSystemDirectory(buf, len_with_null - 1); assert(len == len_with_null);
strcpy(buf, "foo"); len = GetSystemDirectory(buf, len_with_null); assert(strcmp(buf, "foo") != 0); assert(len == strlen(buf)); assert(len == (len_with_null - 1));
return 0; }
If anybody could provide some hints how to integrate it into the winetest system, I and other people will certainly appreciate it.