mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
[ci]Upgrade to check-spelling 0.0.20alpha7 (#19127)
* spelling: added
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: and
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: another
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: color
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: file
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: github
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: not
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: occurrences
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: stamp
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: suppressions
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: the
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: up to
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: whether
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* spelling: whichdoes
Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>
* Upgrade check-spelling to v0.0.20-alpha7
Config based on:
a5001170a7
* Adding duplicate detection to patterns.txt
* Adding line_forbidden.patterns
* Adding reject.txt
* Updated excludes (and sorted)
* Switching to unified workflow
* moving `wil` to allow.txt to clarify that it's a term of art
(https://github.com/microsoft/wil), whereas often it's a typo for `will`.
* Update src/runner/main.cpp
Co-authored-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
This commit is contained in:
@@ -187,7 +187,7 @@ namespace ColorPicker
|
||||
public int Flags;
|
||||
|
||||
/// <summary>
|
||||
/// The time stamp stamp for this message, equivalent to what GetMessageTime would return for this message.
|
||||
/// The time stamp for this message, equivalent to what GetMessageTime would return for this message.
|
||||
/// </summary>
|
||||
public int TimeStamp;
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@ void ShortcutControl::AddNewShortcutControlRow(StackPanel& parent, std::vector<s
|
||||
return;
|
||||
}
|
||||
|
||||
// rowIndex could be out of bounds if the the row got deleted after LostFocus handler was invoked. In this case it should return
|
||||
// rowIndex could be out of bounds if the row got deleted after LostFocus handler was invoked. In this case it should return
|
||||
if (rowIndex >= keyboardRemapControlObjects.size())
|
||||
{
|
||||
return;
|
||||
@@ -207,7 +207,7 @@ void ShortcutControl::AddNewShortcutControlRow(StackPanel& parent, std::vector<s
|
||||
UIElementCollection children = parent.Children();
|
||||
bool indexFound = children.IndexOf(row, rowIndex);
|
||||
|
||||
// IndexOf could fail if the the row got deleted and the button handler was invoked twice. In this case it should return
|
||||
// IndexOf could fail if the row got deleted and the button handler was invoked twice. In this case it should return
|
||||
if (!indexFound)
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -147,7 +147,7 @@ void SingleKeyRemapControl::AddNewControlKeyRemapRow(StackPanel& parent, std::ve
|
||||
UIElementCollection children = parent.Children();
|
||||
bool indexFound = children.IndexOf(row, rowIndex);
|
||||
|
||||
// IndexOf could fail if the the row got deleted and the button handler was invoked twice. In this case it should return
|
||||
// IndexOf could fail if the row got deleted and the button handler was invoked twice. In this case it should return
|
||||
if (!indexFound)
|
||||
{
|
||||
return;
|
||||
|
||||
@@ -94,7 +94,7 @@ namespace RemappingLogicTests
|
||||
Assert::AreEqual(mockedInputHandler.GetVirtualKeyState(0x56), false);
|
||||
}
|
||||
|
||||
// Test if the the keyboard manager state's activated app is correctly set after an app specific remap takes place
|
||||
// Test if the keyboard manager state's activated app is correctly set after an app specific remap takes place
|
||||
TEST_METHOD (AppSpecificShortcut_ShouldSetCorrectActivatedApp_WhenRemapOccurs)
|
||||
{
|
||||
// Remap Ctrl+A to Alt+V
|
||||
@@ -236,7 +236,7 @@ namespace RemappingLogicTests
|
||||
Assert::AreEqual(mockedInputHandler.GetVirtualKeyState(0x56), false);
|
||||
}
|
||||
|
||||
// Test if the the keyboard manager state's activated app is correctly set after an app specific shortcut to key remap takes place
|
||||
// Test if the keyboard manager state's activated app is correctly set after an app specific shortcut to key remap takes place
|
||||
TEST_METHOD (AppSpecificShortcutToSingleKey_ShouldSetCorrectActivatedApp_WhenRemapOccurs)
|
||||
{
|
||||
// Remap Ctrl+A to V
|
||||
|
||||
@@ -287,7 +287,7 @@ namespace Microsoft.Plugin.Program.UnitTests.Programs
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void DedupFunctionWhenCalledMustNotRemovelnkWhichdoesNotHaveExe()
|
||||
public void DedupFunctionWhenCalledMustNotRemovelnkWhichDoesNotHaveExe()
|
||||
{
|
||||
// Arrange
|
||||
List<Win32Program> prgms = new List<Win32Program>
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace Microsoft.Plugin.Program.Storage
|
||||
// Using OrdinalIgnoreCase since this is used internally with paths
|
||||
if (string.IsNullOrEmpty(previousAppPath) || previousAppPath.Equals(currentAppPath, StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// To dequeue a path only if it is the first one in the queue or if the path was the same as thre previous one (to avoid trying to create apps on duplicate events)
|
||||
// To dequeue a path only if it is the first one in the queue or if the path was the same as the previous one (to avoid trying to create apps on duplicate events)
|
||||
previousAppPath = currentAppPath;
|
||||
eventHandlingQueue.TryDequeue(out _);
|
||||
}
|
||||
|
||||
@@ -124,7 +124,7 @@ namespace Microsoft.Plugin.WindowWalker.Components
|
||||
/// <param name="name">New process name.</param>
|
||||
internal void UpdateProcessInfo(uint pid, uint tid, string name)
|
||||
{
|
||||
// TODO: Add verification as to wether the process id and thread id is valid
|
||||
// TODO: Add verification as to whether the process id and thread id is valid
|
||||
ProcessID = pid;
|
||||
ThreadID = tid;
|
||||
Name = name;
|
||||
|
||||
@@ -4741,7 +4741,7 @@ namespace Microsoft.PowerToys.Run.Plugin.TimeZone.Properties {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Gets the the current time of a time zone.
|
||||
/// Looks up a localized string similar to Gets the current time of a time zone.
|
||||
/// </summary>
|
||||
internal static string PluginDescription {
|
||||
get {
|
||||
|
||||
@@ -69,14 +69,14 @@ namespace Microsoft.PowerToys.Run.Plugin.WindowsSettings
|
||||
public bool ShowAsFirstResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the the value with the generated area path as string.
|
||||
/// Gets or sets the value with the generated area path as string.
|
||||
/// This Property IS NOT PART OF THE DATA IN "WindowsSettings.json".
|
||||
/// This property will be filled on runtime by "WindowsSettingsPathHelper".
|
||||
/// </summary>
|
||||
public string? JoinedAreaPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the the value with the generated full settings path (App and areas) as string.
|
||||
/// Gets or sets the value with the generated full settings path (App and areas) as string.
|
||||
/// This Property IS NOT PART OF THE DATA IN "WindowsSettings.json".
|
||||
/// This property will be filled on runtime by "WindowsSettingsPathHelper".
|
||||
/// </summary>
|
||||
|
||||
@@ -221,9 +221,9 @@ namespace PowerLauncher.Helper
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Checks wether this process is running under the system user/account.
|
||||
/// Checks whether this process is running under the system user/account.
|
||||
/// </summary>
|
||||
/// <returns>A boolean value that indicates wether this process is running under system account (true) or not (false).</returns>
|
||||
/// <returns>A boolean value that indicates whether this process is running under system account (true) or not (false).</returns>
|
||||
private static bool IsRunningAsSystem()
|
||||
{
|
||||
using (var identity = WindowsIdentity.GetCurrent())
|
||||
|
||||
@@ -26,9 +26,9 @@ namespace PowerLauncher.Properties {
|
||||
[global::System.Configuration.ApplicationScopedSettingAttribute()]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Configuration.DefaultSettingValueAttribute("https://aka.ms/powerToys")]
|
||||
public string GithubRepo {
|
||||
public string GitHubRepo {
|
||||
get {
|
||||
return ((string)(this["GithubRepo"]));
|
||||
return ((string)(this["GitHubRepo"]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="Wox.Properties" GeneratedClassName="Settings">
|
||||
<Profiles />
|
||||
<Settings>
|
||||
<Setting Name="GithubRepo" Type="System.String" Scope="Application">
|
||||
<Setting Name="GitHubRepo" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">https://github.com/Wox-launcher/Wox</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
|
||||
@@ -389,10 +389,10 @@ namespace Wox.Plugin.Common.VirtualDesktop.Helper
|
||||
/// </summary>
|
||||
/// <param name="hWindow">Handle of the window.</param>
|
||||
/// <param name="desktop">Optional the desktop id if known</param>
|
||||
/// <returns>A value indicating if the window is cloaked by Virtual Desktop Manager, because it is moved to an other desktop.</returns>
|
||||
/// <returns>A value indicating if the window is cloaked by Virtual Desktop Manager, because it is moved to another desktop.</returns>
|
||||
public bool IsWindowCloakedByVirtualDesktopManager(IntPtr hWindow, Guid? desktop = null)
|
||||
{
|
||||
// If a window is hidden because it is moved to an other desktop, then DWM returns type "CloakedShell". If DWM returns an other type the window is not cloaked by shell or VirtualDesktopManager.
|
||||
// If a window is hidden because it is moved to another desktop, then DWM returns type "CloakedShell". If DWM returns another type the window is not cloaked by shell or VirtualDesktopManager.
|
||||
_ = NativeMethods.DwmGetWindowAttribute(hWindow, (int)DwmWindowAttributes.Cloaked, out int dwmCloakedState, sizeof(uint));
|
||||
return GetWindowDesktopAssignmentType(hWindow, desktop) == VirtualDesktopAssignmentType.OtherDesktop && dwmCloakedState == (int)DwmWindowCloakStates.CloakedShell;
|
||||
}
|
||||
@@ -414,7 +414,7 @@ namespace Wox.Plugin.Common.VirtualDesktop.Helper
|
||||
int hr = _virtualDesktopManager.MoveWindowToDesktop(hWindow, desktopId);
|
||||
if (hr != (int)HRESULT.S_OK)
|
||||
{
|
||||
Log.Exception($"VirtualDesktopHelper.MoveWindowToDesktop() failed: An exception was thrown when moving the window ({hWindow}) to an other desktop ({desktopId}).", Marshal.GetExceptionForHR(hr), typeof(VirtualDesktopHelper));
|
||||
Log.Exception($"VirtualDesktopHelper.MoveWindowToDesktop() failed: An exception was thrown when moving the window ({hWindow}) to another desktop ({desktopId}).", Marshal.GetExceptionForHR(hr), typeof(VirtualDesktopHelper));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -655,13 +655,13 @@ namespace winrt::PowerRenameUI::implementation
|
||||
}
|
||||
});
|
||||
|
||||
// CheckBox MatchAllOccurences
|
||||
// CheckBox MatchAllOccurrences
|
||||
checkBox_matchAll().Checked([&](auto const&, auto const&) {
|
||||
ValidateFlags(MatchAllOccurences);
|
||||
UpdateFlag(MatchAllOccurences, UpdateFlagCommand::Set);
|
||||
ValidateFlags(MatchAllOccurrences);
|
||||
UpdateFlag(MatchAllOccurrences, UpdateFlagCommand::Set);
|
||||
});
|
||||
checkBox_matchAll().Unchecked([&](auto const&, auto const&) {
|
||||
UpdateFlag(MatchAllOccurences, UpdateFlagCommand::Reset);
|
||||
UpdateFlag(MatchAllOccurrences, UpdateFlagCommand::Reset);
|
||||
});
|
||||
|
||||
// ToggleButton IncludeFiles
|
||||
@@ -884,7 +884,7 @@ namespace winrt::PowerRenameUI::implementation
|
||||
{
|
||||
checkBox_case().IsChecked(true);
|
||||
}
|
||||
if (flags & MatchAllOccurences)
|
||||
if (flags & MatchAllOccurrences)
|
||||
{
|
||||
checkBox_matchAll().IsChecked(true);
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
enum PowerRenameFlags
|
||||
{
|
||||
CaseSensitive = 0x1,
|
||||
MatchAllOccurences = 0x2,
|
||||
MatchAllOccurrences = 0x2,
|
||||
UseRegularExpressions = 0x4,
|
||||
EnumerateItems = 0x8,
|
||||
ExcludeFiles = 0x10,
|
||||
|
||||
@@ -270,7 +270,7 @@ HRESULT CPowerRenameRegEx::Replace(_In_ PCWSTR source, _Outptr_ PWSTR* result)
|
||||
if (_useBoostLib)
|
||||
{
|
||||
boost::wregex pattern(m_searchTerm, (!(m_flags & CaseSensitive)) ? boost::regex::icase | boost::regex::ECMAScript : boost::regex::ECMAScript);
|
||||
if (m_flags & MatchAllOccurences)
|
||||
if (m_flags & MatchAllOccurrences)
|
||||
{
|
||||
res = boost::regex_replace(wstring(source), pattern, replaceTerm);
|
||||
}
|
||||
@@ -282,7 +282,7 @@ HRESULT CPowerRenameRegEx::Replace(_In_ PCWSTR source, _Outptr_ PWSTR* result)
|
||||
else
|
||||
{
|
||||
std::wregex pattern(m_searchTerm, (!(m_flags & CaseSensitive)) ? regex_constants::icase | regex_constants::ECMAScript : regex_constants::ECMAScript);
|
||||
if (m_flags & MatchAllOccurences)
|
||||
if (m_flags & MatchAllOccurrences)
|
||||
{
|
||||
res = regex_replace(wstring(source), pattern, replaceTerm);
|
||||
}
|
||||
@@ -305,7 +305,7 @@ HRESULT CPowerRenameRegEx::Replace(_In_ PCWSTR source, _Outptr_ PWSTR* result)
|
||||
pos += replaceTerm.length();
|
||||
}
|
||||
|
||||
if (!(m_flags & MatchAllOccurences))
|
||||
if (!(m_flags & MatchAllOccurrences))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ TEST_METHOD(VerifyReplaceAll)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences;
|
||||
DWORD flags = MatchAllOccurrences;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
SearchReplaceExpected sreTable[] = {
|
||||
@@ -173,7 +173,7 @@ TEST_METHOD(VerifyReplaceAllCaseInsensitive)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | CaseSensitive;
|
||||
DWORD flags = MatchAllOccurrences | CaseSensitive;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
SearchReplaceExpected sreTable[] = {
|
||||
@@ -222,7 +222,7 @@ TEST_METHOD(VerifyReplaceAllUseRegEx)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
SearchReplaceExpected sreTable[] = {
|
||||
@@ -246,7 +246,7 @@ TEST_METHOD(VerifyReplaceAllUseRegExCaseSensitive)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions | CaseSensitive;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions | CaseSensitive;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
SearchReplaceExpected sreTable[] = {
|
||||
@@ -270,7 +270,7 @@ TEST_METHOD(VerifyMatchAllWildcardUseRegEx)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
// This differs from the Standard Library: .* has two matches (all and nothing).
|
||||
@@ -325,7 +325,7 @@ TEST_METHOD(VerifyReplaceFirstWildCardUseRegexMatchAllOccurrences)
|
||||
{ L".*", L"Foo", L"AAAAAA", L"FooFoo" },
|
||||
{ L".+", L"Foo", L"AAAAAA", L"Foo" },
|
||||
};
|
||||
VerifyReplaceFirstWildcard(sreTable, ARRAYSIZE(sreTable), UseRegularExpressions | MatchAllOccurences);
|
||||
VerifyReplaceFirstWildcard(sreTable, ARRAYSIZE(sreTable), UseRegularExpressions | MatchAllOccurrences);
|
||||
}
|
||||
|
||||
TEST_METHOD(VerifyReplaceFirstWildCardMatchAllOccurrences)
|
||||
@@ -336,7 +336,7 @@ TEST_METHOD(VerifyReplaceFirstWildCardMatchAllOccurrences)
|
||||
{ L".*", L"Foo", L".*", L"Foo" },
|
||||
{ L".*", L"Foo", L".*Bar.*", L"FooBarFoo" },
|
||||
};
|
||||
VerifyReplaceFirstWildcard(sreTable, ARRAYSIZE(sreTable), MatchAllOccurences);
|
||||
VerifyReplaceFirstWildcard(sreTable, ARRAYSIZE(sreTable), MatchAllOccurrences);
|
||||
}
|
||||
|
||||
TEST_METHOD(VerifyReplaceFirstWildNoFlags)
|
||||
@@ -355,7 +355,7 @@ TEST_METHOD(VerifyHandleCapturingGroups)
|
||||
// To use a capturing group followed by numbers as replacement curly braces are needed.
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions | CaseSensitive;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions | CaseSensitive;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
SearchReplaceExpected sreTable[] = {
|
||||
@@ -423,7 +423,7 @@ TEST_METHOD(VerifyEventsFire)
|
||||
Assert::IsTrue(mockEvents->QueryInterface(IID_PPV_ARGS(®ExEvents)) == S_OK);
|
||||
DWORD cookie = 0;
|
||||
Assert::IsTrue(renameRegEx->Advise(regExEvents, &cookie) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions | CaseSensitive;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions | CaseSensitive;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
Assert::IsTrue(renameRegEx->PutSearchTerm(L"FOO") == S_OK);
|
||||
Assert::IsTrue(renameRegEx->PutReplaceTerm(L"BAR") == S_OK);
|
||||
|
||||
@@ -143,7 +143,7 @@ TEST_METHOD(VerifyReplaceAll)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences;
|
||||
DWORD flags = MatchAllOccurrences;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
SearchReplaceExpected sreTable[] = {
|
||||
@@ -167,7 +167,7 @@ TEST_METHOD(VerifyReplaceAllCaseInsensitive)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | CaseSensitive;
|
||||
DWORD flags = MatchAllOccurrences | CaseSensitive;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
SearchReplaceExpected sreTable[] = {
|
||||
@@ -216,7 +216,7 @@ TEST_METHOD(VerifyReplaceAllUseRegEx)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
SearchReplaceExpected sreTable[] = {
|
||||
@@ -240,7 +240,7 @@ TEST_METHOD(VerifyReplaceAllUseRegExCaseSensitive)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions | CaseSensitive;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions | CaseSensitive;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
SearchReplaceExpected sreTable[] = {
|
||||
@@ -264,7 +264,7 @@ TEST_METHOD(VerifyMatchAllWildcardUseRegEx)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
SearchReplaceExpected sreTable[] = {
|
||||
@@ -314,7 +314,7 @@ TEST_METHOD(VerifyReplaceFirstWildCardUseRegexMatchAllOccurrences)
|
||||
//search, replace, test, result
|
||||
{ L".*", L"Foo", L"AAAAAA", L"Foo" },
|
||||
};
|
||||
VerifyReplaceFirstWildcard(sreTable, ARRAYSIZE(sreTable), UseRegularExpressions | MatchAllOccurences);
|
||||
VerifyReplaceFirstWildcard(sreTable, ARRAYSIZE(sreTable), UseRegularExpressions | MatchAllOccurrences);
|
||||
}
|
||||
|
||||
TEST_METHOD(VerifyReplaceFirstWildCardMatchAllOccurrences)
|
||||
@@ -325,7 +325,7 @@ TEST_METHOD(VerifyReplaceFirstWildCardMatchAllOccurrences)
|
||||
{ L".*", L"Foo", L".*", L"Foo" },
|
||||
{ L".*", L"Foo", L".*Bar.*", L"FooBarFoo" },
|
||||
};
|
||||
VerifyReplaceFirstWildcard(sreTable, ARRAYSIZE(sreTable), MatchAllOccurences);
|
||||
VerifyReplaceFirstWildcard(sreTable, ARRAYSIZE(sreTable), MatchAllOccurrences);
|
||||
}
|
||||
|
||||
TEST_METHOD(VerifyReplaceFirstWildNoFlags)
|
||||
@@ -342,7 +342,7 @@ TEST_METHOD(VerifyHandleCapturingGroups)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions | CaseSensitive;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions | CaseSensitive;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
SearchReplaceExpected sreTable[] = {
|
||||
@@ -373,7 +373,7 @@ TEST_METHOD (VerifyFileAttributesNoPadding)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions ;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions ;
|
||||
SYSTEMTIME fileTime = SYSTEMTIME{ 2020, 7, 3, 22, 15, 6, 42, 453 };
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
@@ -398,7 +398,7 @@ TEST_METHOD (VerifyFileAttributesPadding)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
SYSTEMTIME fileTime = SYSTEMTIME{ 2020, 7, 3, 22, 15, 6, 42, 453 };
|
||||
SearchReplaceExpected sreTable[] = {
|
||||
@@ -422,7 +422,7 @@ TEST_METHOD (VerifyFileAttributesMonthandDayNames)
|
||||
{
|
||||
CComPtr<IPowerRenameRegEx> renameRegEx;
|
||||
Assert::IsTrue(CPowerRenameRegEx::s_CreateInstance(&renameRegEx) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
|
||||
std::locale::global(std::locale(""));
|
||||
@@ -499,7 +499,7 @@ TEST_METHOD(VerifyEventsFire)
|
||||
Assert::IsTrue(mockEvents->QueryInterface(IID_PPV_ARGS(®ExEvents)) == S_OK);
|
||||
DWORD cookie = 0;
|
||||
Assert::IsTrue(renameRegEx->Advise(regExEvents, &cookie) == S_OK);
|
||||
DWORD flags = MatchAllOccurences | UseRegularExpressions | CaseSensitive;
|
||||
DWORD flags = MatchAllOccurrences | UseRegularExpressions | CaseSensitive;
|
||||
Assert::IsTrue(renameRegEx->PutFlags(flags) == S_OK);
|
||||
Assert::IsTrue(renameRegEx->PutSearchTerm(L"FOO") == S_OK);
|
||||
Assert::IsTrue(renameRegEx->PutReplaceTerm(L"BAR") == S_OK);
|
||||
|
||||
@@ -123,7 +123,7 @@ namespace Common
|
||||
// Call garbage collection at the time of unloading of Preview.
|
||||
// Which is preventing prevhost.exe to exit at the time of closing File explorer.
|
||||
// Preview Handlers run in a separate process from PowerToys. This will not affect the performance of other modules.
|
||||
// Mitigate the following Github issue: https://github.com/microsoft/PowerToys/issues/1468
|
||||
// Mitigate the following GitHub issue: https://github.com/microsoft/PowerToys/issues/1468
|
||||
GC.Collect();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user