-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PT-Run] Allow interchangeable use of / instead of \ #33309
base: main
Are you sure you want to change the base?
Conversation
Hi @htcfreek, I wrote some code. Can you review it, please? Also, I'm very new to testing, so could you point out some docs to get help regarding the same? Thanks. |
Screenshot of both input formats would be great in the first place. |
Hi @htcfreek, I didn't quite get you. I have attached some screenshots regarding the new syntax - Some screenshots of the old syntax - |
Do we need the |
No, we don't. Will be removing in the next commit. |
Hi @htcfreek, any updates on this? Also, @jaimecbernardo, if you could comment on the testing part? |
Hi @GhostVaibhav, |
Had no time to test yet. Hopefully on weekend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a bug regarding the input parsing:
- If I have a key "test" and a key "test/test" typing the "t" before the slash removes the key containing the slash from the result list and typing the whole key name clear the result list.
2. The result for key structuer with a key containing a slash is wrong. Looks like the splitting counter behaves wrong.
3. I can't show the contents of a key that's name contains a slash and all their subkeys:
Hi @htcfreek and @jaimecbernardo, thank you both for your valuable input. However, I think I have hit a roadblock while figuring out, how to replace the |
Hi @htcfreek, I resolved all of the bugs that you pointed out while you were testing and added some tests for the same. However, the first one is not a bug from my code, but a bug in the underlying |
Hi @GhostVaibhav . |
Hi @htcfreek, no, I didn't fix it. Also, this issue is completely separate from this PR's objectives. So, we can open a new issue and another PR for the same. |
Hi @htcfreek and @jaimecbernardo |
@GhostVaibhav |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't tried the behavior on a loccal build. But had time to look at the test cases.
[DataRow("HKLM/\"Software\"//test/123", true, @"HKLM\Software", "test/123")] | ||
[DataRow("HKLM/\"Software\"//test\\123", true, @"HKLM\Software", "test\\123")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a test with the /
in a key name. Currently only value names containing a /
are tested. And there are also no test cases for mixed inputs (/
and \
) and having /
in key and value name.
Beeing as creative as possible is great here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added some tests, have a look at them and let me know.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@GhostVaibhav
For my first point we already talked about creating the issue.
The point 3 is working good now and point 2 is working if you use the correct syntax.
But if you type the input without the "
then the bug in point 2 with the wrong key splitting still happens.
Input: "HKEY_CURRENT_USER/test/"
- Should return: "HKEY_CURRENT_USER\test/test" (or nothing)
- Should not return: "HKEY_CURRENT_USER\test/test\new"
💡 Idea:
If we can't parse it without "
then let's show an error result. The error result can tell the user that in this cas he needs "
in the query. It should only be shown on action keyword search.
Hi @htcfreek, are you referring to this? |
@GhostVaibhav |
Then, it's not a bug. We have a "test" key and a "test/test" key. So,
Also, we can't recommend the two results, because of the 2 totally different meanings. |
|
Hi @htcfreek, some things to consider.
Both the above results are the same. So, that should be the expected behavior. If we want different results, we should probably open another issue regarding the same.
Hope it clears some stuff out. |
@GhostVaibhav Does this happen for And shouldn't this get fixed by this PR? I am confused and I am sure that users going to open issues for that. |
Hi @htcfreek, some updates on this. So, the key need not be fully matched to go inside it. On the latest stable release version, here's a screenshot explaining the same - We can see in the above screenshot, that the query Also, this shouldn't be included in this PR, because it is a separate broken functionality that needs to be fixed regardless. And, I guess we don't want to club features and fixes in the same PR. For your concern about users going to open issues for that. I will open the issues myself after this PR is closed and probably try fixing it as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I know that the two open bug are bugs from stable branch an we open issues for it I am okay with it.
The new code looks good to me.
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.
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed
/