Commit graph

13 commits

Author SHA1 Message Date
Sergei Vorobev 616c15556f Re-shuffle minishell tests 2016-11-15 14:49:39 -08:00
Jason Shirk (POWERSHELL) acdf1c1d44 Fix LengthInBufferCells test for downlevel
When running on systems that do not support a virtual terminal,
the tests was incorrectly assuming escape sequences were removed.

The fix is to expect different results depending on whether or not
the host supports virtual terminal mode.
2016-11-14 13:59:43 -08:00
Lincoln Atkinson 594fae475b Wire up proper ConsoleHostRawUserInterface.LengthInBufferCells for Unix (#2637)
* Wire up proper ConsoleHostRawUserInterface.LengthInBufferCells for Unix

Ref https://github.com/PowerShell/PowerShell/issues/2502
This allows for Unix console host to properly calculate display width for
strings containing escape sequences (e.g. ANSI color), rather than
falling back to naive string.Length.

* Add basic tests for host LengthInBufferCells calculation
2016-11-09 10:20:31 -08:00
Jason Shirk (POWERSHELL) 1913244fad Fix powershell -Command - handling of backspace
PowerShell can be started with input redirected in different scenarios.

`powershell -Command -` is one scenario where commands are sent to
PowerShell, but this is not a interactive shell scenario, it's really
a server to run commands from some other process.

`powershell -File -` or just regular redirected input means PowerShell
is an interactive shell, but command line editing must be done via
the redirected standard input handle instead of interacting directly
with a console handle.

In this scenario, we want to provide a good editing experience. Today,
we provide the bare minimum, supporting backspace but no cursor movement.

The bug here is that backspace was treated as a backspace in the server mode
but should not have been.
2016-09-21 15:01:33 -07:00
Jason Shirk (POWERSHELL) f095320787 Fix powershell -Command - to not ignore last command
If the last command sent via stdin did not have a newline,
the command was ignored. This would happen when stdin was closed.
2016-09-21 14:42:16 -07:00
Sergei Vorobev 1638bdf3e6 Merge pull request #2063 from jsoref/spelling-test
spelling fixes: tests
2016-08-31 14:13:49 -07:00
Jason Shirk cf18010ad5 Fix multi-line input w/ redirected stdin (#2090)
The input loop reading from stdin did not handle multi-line input correctly
because it was adding a newline character where none was expected.

The fix was to not include the final newline character to accept input,
just like Console.ReadLine or PSReadline would.
2016-08-31 13:52:46 -07:00
Josh Soref 2badb244de spelling fixes: test 2016-08-25 17:49:32 +00:00
JumpingYang001 2d0d9765d9 Add Shell Interop Pester Test 2016-08-10 23:09:17 -07:00
James Truher 9e225ccae2 changes tags for tests
Start using tags CI, Feature, Scenario
2016-07-27 12:06:51 -07:00
Andrew Schwartzmeyer 25e2316345 Fix Console-Host tests
Update tests from Source Depot and run everywhere.
2016-07-01 14:36:15 -07:00
Andrew Schwartzmeyer fe56aaafa7 Re-enable tests on OS X 2016-07-01 14:36:15 -07:00
James Truher 1e1c4b7dc0 Restructure of pester test layout
This restructuring moves tests to a directory name which matches the module
in which the cmdlet resides which should improve the discoverability of a
specific test.
For tests which are not about cmdlets in a module, new directories have been
created to make those tests easier to find as well
2016-06-29 12:05:41 -07:00
Renamed from test/powershell/ConsoleHost.Tests.ps1 (Browse further)