[PATCH] shell32/tests: Test IShellLink_SetPath with a relative nonexistent file.
Myah Caron
qsniyg at protonmail.com
Mon Sep 14 10:39:22 CDT 2020
Signed-off-by: Myah Caron <qsniyg at protonmail.com>
---
Tested on Windows 10, discovered while writing 192566.
dlls/shell32/tests/shelllink.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/shell32/tests/shelllink.c b/dlls/shell32/tests/shelllink.c
index e4f176237f4..e17b1f67187 100644
--- a/dlls/shell32/tests/shelllink.c
+++ b/dlls/shell32/tests/shelllink.c
@@ -171,6 +171,19 @@ static void test_get_set(void)
ok(r == S_FALSE, "GetPath failed (0x%08x)\n", r);
ok(*buffer=='\0', "GetPath returned '%s'\n", buffer);
+ str="nonexistent_file";
+ r = IShellLinkA_SetPath(sl, str);
+ todo_wine ok(r == S_OK, "SetPath failed (0x%08x)\n", r);
+
+ r = SHGetFolderPathA(NULL, CSIDL_DESKTOP, NULL, 0, mypath);
+ ok(r == S_OK, "SHGetFolderPath failed (0x%08x)\n", r);
+ strcat(mypath, "\\nonexistent_file");
+
+ strcpy(buffer,"garbage");
+ r = IShellLinkA_GetPath(sl, buffer, sizeof(buffer), NULL, SLGP_RAWPATH);
+ ok(r == S_OK, "GetPath failed (0x%08x)\n", r);
+ todo_wine ok(lstrcmpiA(buffer, mypath)==0, "GetPath returned '%s'\n", buffer);
+
/* Win98 returns S_FALSE, but WinXP returns S_OK */
str="c:\\nonexistent\\file";
r = IShellLinkA_SetPath(sl, str);
--
2.28.0
More information about the wine-devel
mailing list