Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

RegistryKey: Flesh out tests - #11006

Merged
stephentoub merged 1 commit into
dotnet:masterfrom
justinvp:registrykey_tests
Aug 19, 2016
Merged

RegistryKey: Flesh out tests#11006
stephentoub merged 1 commit into
dotnet:masterfrom
justinvp:registrykey_tests

Conversation

@justinvp

Copy link
Copy Markdown
Contributor

RegistryKey's sub key name fix-up implementation uses a mark-and-sweep approach. If there are multiple slashes, any extra slash chars will be replaced with a marker char ('\uffff'), and then all '\uffff' chars will be removed, including any pre-existing '\uffff' chars.

If there aren't multiple slashes, any '\uffff' chars should remain.

This commit adds new tests to pin this behavior.

This behavior isn't documented AFAICT, but I assume we want to maintain it for compatibility sake. (I was looking into improving perf of the fix-up implementation for the common case of names that don't need to be fixed-up, which is why this extra coverage is useful).

cc: @stephentoub

RegistryKey's name fix-up implementation uses a mark-and-sweep
approach. If there are multiple slashes, any extra slash chars will be
replaced with a marker char ('\uffff'), and then all '\uffff' chars
will be removed, including any pre-existing '\uffff' chars.

If there aren't multiple slashes, any '\uffff' chars should remain.

This commit adds new tests to pin this behavior.
@stephentoub

Copy link
Copy Markdown
Member

LGTM. Thanks for adding these, Justin.

@stephentoub
stephentoub merged commit 2b3220d into dotnet:master Aug 19, 2016
@justinvp
justinvp deleted the registrykey_tests branch August 19, 2016 19:16
@karelz karelz modified the milestone: 1.1.0 Dec 3, 2016
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants