This app is used for basic PSReadLine functionality testing.
Squashed commit of the following:
commit 3c1ac0aa87df663d0cfb1346352fd240a6ad1fa4
Author: jason@truewheels.net <jason@truewheels.net>
Date: Sun Dec 13 09:23:31 2015 -0800
Use nuget packages for PowerShell SDK.
commit 0fe7731a68d62af9508200a067aa162cb5154f68
Author: jason@truewheels.net <jason@truewheels.net>
Date: Sat Nov 14 20:11:50 2015 -0800
Merge branch 'master' of https://github.com/srdubya/PSReadLine into vimode
commit aa6510e19887dd2cb1ed7fa06b172dc456b0cede
Author: Jason Shirk (POWERSHELL) <jasonsh@microsoft.com>
Date: Thu Jun 18 18:24:23 2015 -0700
Fix/suppress various FxCop errors
commit d59a997c3a2b4d18b91e0f937fc4ff76e58929f1
Author: Jason Shirk (POWERSHELL) <jasonsh@microsoft.com>
Date: Thu Jun 18 15:32:20 2015 -0700
Rename namespace PSConsoleUtilities to Microsoft.PowerShell
commit 258a8f28db90d98b8785487516544836ce42bb4e
Author: jason@truewheels.net <jason@truewheels.net>
Date: Fri Sep 26 18:15:19 2014 -0700
Fix exception after AcceptAndGetNext
The "current" line cleared after accepting via AcceptAndGetNext
and we would crash trying to recall this current line.
I've changed how history search works after AcceptAndGetNext
to work in a more natural way so that arrow keys can be used
to recall commands near the accepted command instead of
searching for other commands with the same prefix.
Fixes#152.
commit e069ed088a9ea970d8b0e9cdb990da5ad4d20f01
Author: jason@truewheels.net <jason@truewheels.net>
Date: Tue Sep 9 17:36:59 2014 -0700
Add ValidateAndAcceptLine function
To avoid cluttering the screen and history with command lines
that don't work because of stupid errors like "command not found",
you can bind enter to ValidateAndAcceptLine.
commit cb81fa2cc4708ee54214320dc6ce8564e38a1642
Author: jason@truewheels.net <jason@truewheels.net>
Date: Fri Jun 27 20:58:57 2014 -0700
Fix prompt error highlight characters
When deciding what character to color red for errors, we were
using IsSymbol - that was a bit too restrictive so it was changed
to be any non-whitespace and non-alphanumeric characters.
Fixes#127
commit 0ecd15d909ea31ccd9390c15d295af2f750d0d68
Author: Jason Shirk <jason@truewheels.net>
Date: Thu Jun 12 14:09:17 2014 -0700
Attempt better recovery from an exception
If an exception occurs when editing the command line, display some
diagnostic information so that I might get a bug report. Also
attempt to restore the command line so they can continue editing.
commit 079d18223c7e49638c96f4533d27198b47a5d2bb
Author: jason@truewheels.net <jason@truewheels.net>
Date: Thu Apr 17 09:28:04 2014 -0700
Tweak for easier testing
commit d79bf5056bdef0a165ee453c5f7b45e528cc0681
Author: jason@truewheels.net <jason@truewheels.net>
Date: Sun Apr 13 11:21:30 2014 -0700
Cleanup some Resharper issues
commit 1258dd12cab81d07aa52d388468ee9ef99063664
Author: jason@truewheels.net <jason@truewheels.net>
Date: Sun Jan 26 20:21:22 2014 -0800
InvokePrompt tests
Removed Console.WriteLine replacement as it didn't work for InvokePrompt.
Changed test harness to override VS and actually write stdout to the screen.
commit 526b0b5123c88cd8f47a166f376f34356976edb5
Author: jason@truewheels.net <jason@truewheels.net>
Date: Fri Jan 24 23:00:48 2014 -0800
Remove custom bindings
commit fd0679c0da99da5ae4e1d5a59842b1fb0a9af6c2
Author: jason@truewheels.net <jason@truewheels.net>
Date: Fri Jan 3 00:09:49 2014 -0800
Add CaptureScreen function
CaputureScreen is used to copy lines from the screen to the clipboard.
Text is copied in plain text as well as rtf with colors.
Rtf looks best in Outlook - which is my primary reason for adding the feature.
commit e2a0b53f72a0e6a39a9736a3c1a3d2a6b1b81184
Author: Jason Shirk <jason@truewheels.net>
Date: Fri Nov 15 07:29:12 2013 -0800
Fix Undo after Paste
commit 8453eca0dd9ffe0cb160fefb12d0be935e64ec85
Author: Jason Shirk <jason@truewheels.net>
Date: Fri Nov 15 00:30:50 2013 -0800
Ctrl-R support
commit 0b058c2aaee18b33d97dd8d375fac7bbf4d07ce9
Author: Jason Shirk <jason@truewheels.net>
Date: Sat Nov 2 08:49:48 2013 -0700
Really exit from test program when typing exit
Exit wasn't exiting anymore because the thread that reads keys was blocked.
commit e9d5203346f62dacc6315c8e8cb4dc227a6477df
Author: Jason Shirk <jason@truewheels.net>
Date: Mon Sep 23 09:03:59 2013 -0700
Comment out history search in test program
commit 674f90a64c5c627d50f6b018511eb9585640d65a
Author: Jason Shirk <jason@truewheels.net>
Date: Thu Sep 19 09:18:19 2013 -0700
Add demo mode and ETW trace
Added ETW tracing for key presses (a key logger!) so it can be used
in a variety of ways, e.g. when doing performance profiling, you can
add a message of sorts via key presses if you turn on the provider.
The ETW tracing code depends on CLR 4.5, this might force some folks
to upgrade.
Added PSReadline.EnableDemoMode which uses the ETW trace to display
key presses while you type. This is useful for talks and producing
screen captures to show the editing experience.
commit 222a5efea732d6c34e5263b638d5d3fc04407355
Author: Jason Shirk <jason@truewheels.net>
Date: Wed Sep 11 17:55:30 2013 -0700
Support 2 key chords
Support for 2 key chords has been added.
There is a small breaking change in Set-PSReadlineKeyHandler
because the -CtrlX switch is no longer needed. It could have
been left in, but it's better to just remove it - not very
many people use this module yet.
The signature of key handlers was also changed to better support
features that have not yet been implemented. The signature change
shouldn't affect any existing key handlers because default arguments
should cover those cases.
commit 3121bcbf6c57b98ead2cc525f8d3d40cbc54c49e
Author: Jason Shirk <jason@truewheels.net>
Date: Fri May 24 19:56:34 2013 -0700
Add Get-PSReadlineKeyHandler
To make it easier to see what keys are bound, you can use the command Get-PSReadlineKeyHandler.
The command Set-PSReadlineKeyHandler also adds support for binding Ctrl-X prefixed commands in Emacs mode.
commit ed78159f1a27f7a78a26fbad555203dcee94a05c
Author: Jason Shirk <jason@truewheels.net>
Date: Sun May 12 23:52:15 2013 -0700
Initial checkin.
The `Get-Process` cmdlet cannot be used for these types of tests due to
security constraints on OS X.
These tests are about to be re-written soon anyway, so the simple fix
was to use another cmdlet.
Instead of using `dotnet publish`, we can use `dotnet build` and the new
`netcoreapp1.0` framework with a new dependency on
`Microsoft.NETCore.App` to generate output that does not include the
runtime, but can be run anywhere (given the installation of the
runtime).
While we cannot yet adopt a dependency on the shared host until .NET
Core RTM, we are forced to switch to this system anyway because the
latest RC3 packages and CLI do not support `netstandardapp1.5`. See
dotnet/cli#2482.
Thus we're in an in-between state where we have to use `netcoreapp1.0`,
but cannot use `"Microsoft.NETCore.App": { "type": "platform" }` to
utilize the shared host, as we need to continue to ship our host.
Without specifying "platform", we retain the status quo with respect to
build steps and outputs.
Additionally, there is no longer a good reason to use the RC3 packages,
and it has been advised we switch to RC2 since the
`Microsoft.NETCore.App` is only available for RC2. We must update
packages because our current version can no longer be debugged.
**Added -Pending:$flags for Linux and OSX to set-content and add-content
tests that expose dynamic variable file issues on these platforms
(https://github.com/PowerShell/PowerShell/issues/891)
**Handled platform-specific line-ending differences in Get-Content
-ReadLine - Tail tests
When the Pester tests were invoked over PSRP and the environment was
more pristine than a local client, the lack of a "foo" variable in some
scope caused the Pester test suite to emit an error at the end, failing
the PSRP build.
Removing the Clear-Variable directive eliminates this error, and is not
necessary for the Pester test itself.
The latest xUnit packages fix the "could not resolve coreclr path"
problem we were having. To resolve all dependencies, the cli-deps feed
was replaced with the aspnet feeds.
However, the latest xUnit packages do not allow us to set the default
AssemblyLoadContext.
- The Get-Process cmdlet on OS X has issues due to permissions
- The Get-Process test in NativeLinuxCommands should have been removed
- The ProcessName property has the same bug that has been fixed on Linux
This action is completely valid on both Windows and Linux (and OS X)
operating systems; tested with `mklink` and `ln -s` respectively.
Note that targets for hard links must exist, thus we check specifically
for symbolic links.
Both the path globber in session state and the `New-Item` implementation
needed to be fixed to allow the target not to exist.
Resolves#801.
Also enable symbolic link tests on Windows.
- Get rid of the assumption that all framework assemlbies live in
the same place
- Enable build scenario (assemlbies are referenced directly from unpacked
nuget packages)
- Fix#766
- Re-enable Add-Type tests
This bug arose because of a shortcut previously taken when generating
input for the type catalog generator. With a proper parser created, the
input to the generator is now correct, and so this test should succeed.
OS X's ping command requires the flags to be specified before the
arguments. I also reduced the ping count so that the tests execute a bit
faster. This resolves#556.
With the switch to `netstandardapp1.5` framework for the host, the xUnit
test runner broke. For `dotnet test` to work with the .NET Core xUnit
runner, it must continue to target `dnxcore50`. Fortunately, we can
import our project's framework, and make everything work again.
Also improved the `xunit.sh` script to check for dependencies.
All libraries now use the framework `netstandard1.5`, and import the
`dnxcore50` and `portable` frameworks. The app that is published,
Microsoft.PowerShell.Linux.Host, that is, the top-level dependency that
emits an executable, instead targets `netstandardapp1.5` and has a new
`runtimes` key so that .NET CLI's `restore` and `publish` commands know
which runtime implementations to resolve.
When switching to the new CLI, we needed to fix how we specified our
dependencies. In particular, the .NET CLI team helped me figure out how
to download packages that are reference assembly only on Linux, with
implementations on Windows. The result of this is the new `frameworks`
setup.
Additionally, we were incorrectly specifying our build dependencies;
that is, projects we also build (not packages). The solution was much
cleaner. We removed the `type: build` section and replaced it with the
version `1.0.0-*` that all our projects currently use.
The `project.json` files also had their names, descriptions,
indentation, and versions fixed.
The build scripts were simplified.
This was a temporary work-around that now needs to be removed (mostly
because the xUnit tests are out-of-date because we didn't have a runner,
and it's not worth it to fix them). Rather than let more cruft
accumulate, we need to remove it.
Resolves#551
This way it can also be deployed automatically, removing the last manual
copy steps from our build scripts.
Travis and AppVeyor configurations updated for new submodule location.
On Windows, HOMEPATH is not necessarily `\Users\username`, so the test
was made to match more loosely.
Wait-Event's timeout varied more than expected, so the test's range was
increased.
This change brings a very minimal set of tests and make
build fail, if we cannot load some PS assamblies on FullCLR
We should increase test coverage for FullCLR in future.
Commands.Utility now needs Microsoft.CodeAnalysis.CSharp, which doesn't
explicitly target `dnxcore50`, so now Commands.Utility and the packages
which depend on it now much `import` the Portable Windows framework.
This also required adding the aspnetvnext feed.
System.Management.Automation now requires System.Diagnostics.StackTrace.
- Pester source code moved to `test/Pester`, deleted `ext-src`.
- Pester tests (.ps1 files) moved to `test/powershell`
- xUnit tests (.cs files) moved to `test/csharp`
- Third-party script test moved to `test/shebang`