Commit c1dafc51 authored by Alexandre Julliard's avatar Alexandre Julliard

comdlg32/tests: Print the id of the GetSaveFileName test on failure.

parent 6471e862
...@@ -1059,7 +1059,7 @@ static void test_extension(void) ...@@ -1059,7 +1059,7 @@ static void test_extension(void)
char curdir[MAX_PATH]; char curdir[MAX_PATH];
char *filename_ptr; char *filename_ptr;
const char *test_file_name = "deadbeef"; const char *test_file_name = "deadbeef";
const char **cur_filter; unsigned int i;
DWORD ret; DWORD ret;
BOOL boolret; BOOL boolret;
...@@ -1077,13 +1077,13 @@ static void test_extension(void) ...@@ -1077,13 +1077,13 @@ static void test_extension(void)
ofn.lpfnHook = test_extension_wndproc; ofn.lpfnHook = test_extension_wndproc;
ofn.nFileExtension = 0; ofn.nFileExtension = 0;
for (cur_filter = defext_filters; cur_filter < defext_filters + ARRAY_SIZE(defext_filters); cur_filter++) { for (i = 0; i < ARRAY_SIZE(defext_filters); i++) {
ofn.lpstrFilter = *cur_filter; ofn.lpstrFilter = defext_filters[i];
strcpy(filename, test_file_name); strcpy(filename, test_file_name);
boolret = GetSaveFileNameA(&ofn); boolret = GetSaveFileNameA(&ofn);
ok(boolret, "expected true\n"); ok(boolret, "%u: expected true\n", i);
ret = CommDlgExtendedError(); ret = CommDlgExtendedError();
ok(!ret, "CommDlgExtendedError returned %#x\n", ret); ok(!ret, "%u: CommDlgExtendedError returned %#x\n", i, ret);
filename_ptr = ofn.lpstrFile + strlen( ofn.lpstrFile ) - strlen( test_file_name ); filename_ptr = ofn.lpstrFile + strlen( ofn.lpstrFile ) - strlen( test_file_name );
ok( strlen(ofn.lpstrFile) >= strlen(test_file_name), "Filename %s is too short\n", ofn.lpstrFile ); ok( strlen(ofn.lpstrFile) >= strlen(test_file_name), "Filename %s is too short\n", ofn.lpstrFile );
ok( strcmp(filename_ptr, test_file_name) == 0, ok( strcmp(filename_ptr, test_file_name) == 0,
......
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