Skip to content

Commit

Permalink
try again
Browse files Browse the repository at this point in the history
  • Loading branch information
ryfu-msft committed Dec 10, 2024
1 parent b5f3c16 commit bc8221f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/AppInstallerCLIE2ETests/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public class Constants
public const string PathSubKey_User = @"Environment";
public const string PathSubKey_Machine = @"SYSTEM\CurrentControlSet\Control\Session Manager\Environment";
public const string FontsSubKey = @"Software\Microsoft\Windows NT\CurrentVersion\Fonts";
public const string TestFontSubKeyName = "Cascadia Code PL (True Type)";
public const string TestFontSubKeyName = "Cascadia Code PL Regular (TrueType)";

// User settings
public const string ArchiveExtractionMethod = "archiveExtractionMethod";
Expand Down
13 changes: 9 additions & 4 deletions src/AppInstallerCLIE2ETests/Helpers/TestCommon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,12 +389,17 @@ public static void VerifyFontPackage(
if (shouldExist)
{
// TODO: Replace with font uninstall when implemented.
File.Delete(expectedFontInstallPath);
if (fontEntryExists)
{
using (RegistryKey fontsRegistryKey = baseKey.OpenSubKey(Constants.FontsSubKey, true))
{
fontsRegistryKey.DeleteSubKey(fontSubKeyName);
}
}

using (RegistryKey fontsRegistryKey = baseKey.OpenSubKey(Constants.FontsSubKey, true))
if (fontFileExists)
{
fontsRegistryKey.DeleteSubKey(fontSubKeyName);
RegistryKey fontEntry = fontsRegistryKey.OpenSubKey(fontSubKeyName, true);
File.Delete(expectedFontInstallPath);
}
}

Expand Down

0 comments on commit bc8221f

Please sign in to comment.