[PowerRename] Don't treat extensions for folders (#14908)

* Dont treat extensions for folders

* Simplify fix and add test

* Add try/catch

* Update test to avoid updating spellcheck
This commit is contained in:
Stefan Markovic
2021-12-14 14:42:37 +01:00
committed by GitHub
parent f5d2f86c23
commit d359b3adc8
4 changed files with 119 additions and 72 deletions

View File

@@ -293,8 +293,9 @@ namespace PowerRenameManagerTests
TEST_METHOD (VerifyExtensionOnlyTransform)
{
rename_pairs renamePairs[] = {
{ L"foo.FOO", L"foo.bar", false, true, 0 },
{ L"foo.bar", L"foo.bar_norename", false, false, 0 }
{ L"foo.FOO", L"foo.bar", true, true, 0 },
{ L"bar.FOO", L"bar.FOO_norename", false, false, 0 },
{ L"foo.bar", L"foo.bar_norename", true, false, 0 }
};
RenameHelper(renamePairs, ARRAYSIZE(renamePairs), L"foo", L"bar", SYSTEMTIME{ 2020, 7, 3, 22, 15, 6, 42, 453 }, DEFAULT_FLAGS | Lowercase | ExtensionOnly);