mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
[PTRun][Registry]Allow interchangeable use of / instead of \ (#33309)
## Summary of the Pull Request As the title suggests, the PR adds the feature of using / instead of \ in the Registry plugin of PT Run.
This commit is contained in:
@@ -17,6 +17,18 @@ namespace Microsoft.PowerToys.Run.Plugin.Registry.UnitTest.Helper
|
||||
[DataRow(@"HKLM\\Test", true, @"HKLM", "Test")]
|
||||
[DataRow(@"HKLM\Test\\TestTest", true, @"HKLM\Test", "TestTest")]
|
||||
[DataRow(@"HKLM\Test\\\TestTest", true, @"HKLM\Test", @"\TestTest")]
|
||||
[DataRow("HKLM/\"Software\"/", false, @"HKLM\Software\", "")]
|
||||
[DataRow("HKLM/\"Software\"//test", true, @"HKLM\Software", "test")]
|
||||
[DataRow("HKLM/\"Software\"//test/123", true, @"HKLM\Software", "test/123")]
|
||||
[DataRow("HKLM/\"Software\"//test\\123", true, @"HKLM\Software", @"test\123")]
|
||||
[DataRow("HKLM/\"Software\"/test", false, @"HKLM\Software\test", "")]
|
||||
[DataRow("HKLM\\Software\\\"test\"", false, @"HKLM\Software\test", "")]
|
||||
[DataRow("HKLM\\\"Software\"\\\"test\"", false, @"HKLM\Software\test", "")]
|
||||
[DataRow("HKLM\\\"Software\"\\\"test/software\"", false, @"HKLM\Software\test/software", "")]
|
||||
[DataRow("HKLM\\\"Software\"/\"test\"\\hello", false, @"HKLM\Software\test\hello", "")]
|
||||
[DataRow("HKLM\\\"Software\"\\\"test\"\\hello\\\\\"some/value\"", true, @"HKLM\Software\test\hello", "some/value")]
|
||||
[DataRow("HKLM\\\"Software\"\\\"test\"/hello\\\\\"some/value\"", true, @"HKLM\Software\test\hello", "some/value")]
|
||||
[DataRow("HKLM\\\"Software\"\\\"test\"\\hello\\\\some\\value", true, @"HKLM\Software\test\hello", @"some\value")]
|
||||
public void GetQueryPartsTest(string query, bool expectedHasValueName, string expectedQueryKey, string expectedQueryValueName)
|
||||
{
|
||||
var hasValueName = QueryHelper.GetQueryParts(query, out var queryKey, out var queryValueName);
|
||||
|
||||
Reference in New Issue
Block a user