Skip to content

Commit 7e6b2b4

Browse files
committed
Check parsing name in ShellEnumeratorImplTest
Previously, the SHGDN_NORMAL name was checked. However, that name is affected by whether extensions are shown or hidden in Explorer. As the test matches against the full file name, it's necessary to retrieve the SHGDN_INFOLDER | SHGDN_FORPARSING name instead, since that name will always include the extension.
1 parent 0354564 commit 7e6b2b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Explorer++/TestExplorer++/ShellEnumeratorImplTest.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,8 @@ class ShellEnumeratorImplTest : public Test
6060
for (const auto &item : items)
6161
{
6262
std::wstring name;
63-
ASSERT_HRESULT_SUCCEEDED(GetDisplayName(parent.get(), item.Raw(), SHGDN_NORMAL, name));
63+
ASSERT_HRESULT_SUCCEEDED(
64+
GetDisplayName(parent.get(), item.Raw(), SHGDN_INFOLDER | SHGDN_FORPARSING, name));
6465

6566
itemNames.push_back(name);
6667
}

0 commit comments

Comments
 (0)