-
Notifications
You must be signed in to change notification settings - Fork 49
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
Improve round-tripping and be a bit more liberal #7
Conversation
Please post an example of an INI file that includes a section-less key. Is this a feature that is supported elsewhere in Windows? Otherwise, I'm OK w/ the enhancements. I added Pester unit tests to Master. Please run them on you enhancements--add and modify tests if necessary. |
Honestly, I don't know whether other Windows apps support section-less keys, but PsIni supported them, I just changed the support so they would round-trip. I'm on vacation at the moment and don't have access to a Windows machine until the second week of May. I will update/add tests when I get back to work. Thanks. |
Hi thanks |
I'm in the midst of sorting out the tests and I wanted to mention that as they are, the tests don't pass because of the FilePath validation for creating a file. It doesn't like the Is there a reason to have the complex regex there and not just let the call to New-Item fail if an invalid path is given? |
I've merged with 1.0.4 and I've added some tests. However one of the existing tests was failing and is still failing due to the ordering issue with hashtables. I'm not sure you can input a hashtable and assert an exact string match. Let me know if there are more changes necessary. |
Improve round-tripping and be a bit more liberal
Thank you Colin |
I'm not expecting this PR to be taken at face value necessarily because I know that I've changed a fair bit, including one breaking change with the keys not within a section.
My motivation was to allow the library to handle Mercurial
.hgrc
files which are.ini
-like, and to enable better round-tripping of the files.The changes include:
OrderedDictionary
(in a PowerShell 2.0 friendly way) instead of normal hashtables.#
as comments in addition to;
._
as the section-less section instead ofNo-Section
. I'd be okay to change that back if desired..ini