mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
Index Desktop Applications (#4422)
* Added support to index desktop app * Fixed dedup for url files * Added internet shortcut scheme for epic games * Added test for internet shortcut dedup * Updated hostname for steam game
This commit is contained in:
committed by
GitHub
parent
73125574e6
commit
196055e50e
@@ -126,6 +126,24 @@ namespace Wox.Test.Plugins
|
||||
LnkResolvedPath = "c:\\programdata\\microsoft\\windows\\start menu\\programs\\test proxy.lnk"
|
||||
};
|
||||
|
||||
Win32 dummy_internetShortcut_app = new Win32
|
||||
{
|
||||
Name = "Shop Titans",
|
||||
ExecutableName = "Shop Titans.url",
|
||||
FullPath = "steam://rungameid/1258080",
|
||||
ParentDirectory = "C:\\Users\\temp\\AppData\\Roaming\\Microsoft\\Windows\\Start Menu\\Programs\\Steam",
|
||||
LnkResolvedPath = null
|
||||
};
|
||||
|
||||
Win32 dummy_internetShortcut_app_duplicate = new Win32
|
||||
{
|
||||
Name = "Shop Titans",
|
||||
ExecutableName = "Shop Titans.url",
|
||||
FullPath = "steam://rungameid/1258080",
|
||||
ParentDirectory = "C:\\Users\\temp\\Desktop",
|
||||
LnkResolvedPath = null
|
||||
};
|
||||
|
||||
[Test]
|
||||
public void DedupFunction_whenCalled_mustRemoveDuplicateNotepads()
|
||||
{
|
||||
@@ -141,6 +159,21 @@ namespace Wox.Test.Plugins
|
||||
Assert.AreEqual(apps.Length, 1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DedupFunction_whenCalled_MustRemoveInternetShortcuts()
|
||||
{
|
||||
// Arrange
|
||||
List<Win32> prgms = new List<Win32>();
|
||||
prgms.Add(dummy_internetShortcut_app);
|
||||
prgms.Add(dummy_internetShortcut_app_duplicate);
|
||||
|
||||
// Act
|
||||
Win32[] apps = Win32.DeduplicatePrograms(prgms.AsParallel());
|
||||
|
||||
// Assert
|
||||
Assert.AreEqual(apps.Length, 1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void DedupFunction_whenCalled_mustNotRemovelnkWhichdoesNotHaveExe()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user