| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I updated this pull request via force push using the accepted answer from this question. |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry it took forever for me to take a look
I have some general comments that need to be addressed and I'll try to take a closer look then, or maybe Dongbo Wang (@daxian-dbw) will beat me to it.
Sorry, something went wrong.
…esting internal helper classes.
|
Sorry, I force-pushed again because there was structural changes to address your general comments. From now on I will address your feedback with additional commits. |
Sorry, something went wrong.
|
This PR still shows changes requested even though I have carried out the changes. |
Sorry, something went wrong.
|
It looks like not all of the new tests were run in CI - presumably because test discovery isn't searching Microsoft.PowerShell.PSReadLine2.dll. I'd like Dongbo Wang (@daxian-dbw) to approve including tests like this before merging. |
Sorry, something went wrong.
|
The latest commit adds discovery and execution of thoses unit-tests. For this purpose, the main module is compiled with an alternate set of options and to a target assembly named Microsoft.PowerShell.PSReadLine2.UnitTests.dll so that it does not conflict with the release assembly. Dongbo Wang (@daxian-dbw), are you OK with these changes? |
Sorry, something went wrong.
|
Can we move the test code to PSReadLine.Tests (under PSReadLine\test)? We can make Microsoft.PowerShell.PSReadLine2 internal visible to PSReadLine.Tests. |
Sorry, something went wrong.
|
I thought about doing this but was deterred as per Jason Shirk (@lzybkr)’s comment. I would be happy to go ahead, but I do not know how to handle InternalsVisibleTo and assembly delay-signing? For this to work, there would need to be a strong-name snk file in the repository for signing both assemblies. The way I handled this in the past was for the owner of the repository to include an encrypted version of the release strong-name snk file in the repository, and use AppVeyor secure strings to decrypt the file during the build. Would that work for you Dongbo Wang (@daxian-dbw)? |
Sorry, something went wrong.
|
I don't think InternalsVisibleTo requires the involved assemblies to be strong-name signed. Quoted the following from the doc of this attribute
I think you can just add [assembly: InternalsVisibleTo("PSReadLine.Tests")] to PSReadLine\PSReadLine\AssemblyInfo.cs and it should work. |
Sorry, something went wrong.
|
I can’t believe I just learned about that fact today 😱😱! |
Sorry, something went wrong.
|
Thanks Maxime Labelle (@springcomp)! |
Sorry, something went wrong.
|
Build fixed. Maxime Labelle (@springcomp) Could you please review my changes? Thanks! |
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, that is the reason why I created a separate file but this solution is certainly better.
Sorry, something went wrong.
|
With this PR, I intend to work next on implementing dd (delete line) and, possibly S (substitute line) as natural extensions, so am looking forward to seeing this merged. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is my take at #333.
I thought best to create a ViRegister class to replace the current _clipboard String because I wanted to support pasting "line wise" irrespective of where the cursor is at when pasting occurs. I created an event that gets raised each time the buffer is about to change as part of a paste operation, to hook into undo/redo without too much coupling.
Please, let me know your thoughts and suggestions for improvements.