Commit ecb2d7bd authored by Alexandre Julliard's avatar Alexandre Julliard

winetest: Report the correct source directory for program tests.

parent 6fae8e1d
...@@ -300,16 +300,24 @@ static const char* get_test_source_file(const char* test, const char* subtest) ...@@ -300,16 +300,24 @@ static const char* get_test_source_file(const char* test, const char* subtest)
{ 0, 0 } { 0, 0 }
}; };
static char buffer[MAX_PATH]; static char buffer[MAX_PATH];
int i; int i, len = strlen(test);
if (len > 4 && !strcmp( test + len - 4, ".exe" ))
{
len = sprintf(buffer, "programs/%s", test) - 4;
buffer[len] = 0;
}
else len = sprintf(buffer, "dlls/%s", test);
for (i = 0; special_dirs[i][0]; i++) { for (i = 0; special_dirs[i][0]; i++) {
if (strcmp(test, special_dirs[i][0]) == 0) { if (strcmp(test, special_dirs[i][0]) == 0) {
test = special_dirs[i][1]; strcpy( buffer, special_dirs[i][1] );
len = strlen(buffer);
break; break;
} }
} }
snprintf(buffer, sizeof(buffer), "dlls/%s/tests/%s.c", test, subtest); sprintf(buffer + len, "/tests/%s.c", subtest);
return buffer; return buffer;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment