Commit graph

25 commits

Author SHA1 Message Date
Ilya 450d884668
Add test for $error[0] tab completion (#7924) 2018-10-03 12:34:21 +05:00
Sergey Vasin 740d059d51 Change parameters order in Get-Help and help in order to get first -Full and then -Functionality when using Get-Help -Fu<tab> and help -Fu<tab>. (#7370) 2018-07-31 11:13:18 +05:00
Sergey Vasin da6d2647ac Use -BeExactly and -HaveCount instead of -Be in TabCompletion.Tests.ps1. (#7380) 2018-07-30 10:32:52 +05:00
Steve Lee 5f47fc0e8c Fix tab expansion for Get-Process on macOS (#7176)
* fix tab exapnsion for get-process on macOS

* add comment to address PR feedback
2018-06-27 12:48:42 -07:00
Klaudia Algiz 2df9aac811 Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests (#6682)
Convert ShouldBeErrorId to Should -Throw -ErrorId in PowerShell tests.
Get rid of try { } catch { } formula to assert that errors were thrown.
Small fixes in tests to obey the new Pester -Parameter syntax.
2018-05-17 14:42:04 -07:00
Ilya 84344cbb32 Update PowerShell to build with .NET Core SDK 2.1.300-rc1-008662 (#6718)
* Build Update
- Change `TargetFramework` to `netcoreapp2.1` and removed unnecessary `RuntimeFrameworkVersion` from `PowerShell.Common.props`
- Update dotnet SDK to 2.1.300-rc1-008662
- Update `TypeGen` target in `Build.psm1` to work with 2.1
- Rename macOS runtime to `osx-x64` as the old build logic expects 10.12 and breaks running on 10.13 system.
- Remove `PackageReference` to `System.Memory` as it's part of dotnetcore 2.1
- Update search for `crossgen` executable to find the matching version

* Test Update
- Update test tools `WebListener` to latest `asp.net core`
- Marked `AuthHeader Redirect` tests as `Pending` due to change in CoreFX
2018-05-02 16:58:39 -07:00
Aditya Patwardhan 610ae1a63f Update 'Update-Help' to save help content in user scope by default (#6352)
Add the parameter `-Scope` to `Update-Help`, which takes `AllUsers` or `CurrentUser`. The default value is `CurrentUser`.
2018-04-02 15:32:55 -07:00
Christoph Bergmeister e86fea6acd Upgrade tests in test\powershell\Host folder to PesterV4 syntax (#6250) 2018-03-23 10:48:26 -07:00
kwkam 5f202d676f Add 'NullReference' checks to two code paths related to 'PseudoParameterBinder' (#5738)
1. Add a null check in the tab completion code on the binding result returned from `PseudoParameterBinder`;
2. Add a null check in `CommandDiscovery.LookupCommandProcessor` on the `CommandInfo` object returned from the method `LookupCommandInfo`.
2018-03-16 09:10:06 -07:00
Steve Lee c1c5344a88 Update copyright and license headers (#6134)
Based on standard practices, we need to have a copyright and license notice at the top of each source file. Removed existing copyrights and updated/added copyright notices for .h, .cpp, .cs, .ps1, and .psm1 files.

Updated module manifests for consistency to have Author = "PowerShell" and Company = "Microsoft Corporation". Removed multiple line breaks.

Separate PR coming to update contribution document for new source files: #6140

Manually reviewed each change.

Fix #6073
2018-02-13 09:23:53 -08:00
Aditya Patwardhan 381134ba59 Updated csproj to use the latest help package (#5454) 2017-11-15 16:29:04 -08:00
Steve Lee 2cc091115b Rename powershell.exe to pwsh.exe (#5101)
- Rename powershell.exe to pwsh.exe
- Fixe appveyor.psm1
- Update MSI to include 'pwsh' in path and app paths
- Revert change for hyper-v powershell direct
- Update names in packaging.psm1.
- Fix check for SxS
2017-10-17 17:25:11 -07:00
Aditya Patwardhan 486fb97123 Test fixes and code coverage automation fixes. (#5046)
* Test fixes and updates to code coverage automation
* Fixed UpdatableHelpSystem tests and tab completion tests
* Fixed tab completion tests to better disambiguate root/interop namespace.
* Skip SSH test if ssh.exe is not present
2017-10-13 13:54:43 -07:00
Steve Lee 23420643e3 Added WSMan Config provider tests (#4756)
* [Feature]
fixed issues in WSMan Config Provider
added tests for get-item, get-childitem, set-item, new-item remove-item, clear-item, dynamic parameters
merged CoreClr and FullClr code

* [feature]
address PR feedback

* [feature]
revert to using microsoft.powershell plugin as base for test
keeps it simple rather than relying on additional scripts or cmdlets since these tests don't require remoting

* [feature]
address Aditya's feedback

* [feature]
address some cosmetic feedback

* [feature]
based on discussion with Jim, we should skip resx checks on non-Windows
2017-09-18 15:44:09 -07:00
Steve Lee 4ad313aafb Add tests for Get-Module over remoting (#4787)
Some additional tests that are remoting specific based on code coverage
2017-09-12 17:12:52 -07:00
Steve Lee fb286e6cf8 Removed double spaces from .cs and .ps1 files (#4743) 2017-09-04 19:45:51 -07:00
Dongbo Wang a648d4dd9c Add more tab completion tests (#4560)
* Add tab completion tests for CompletionAnalysis.cs

* Minor fixes

* Address comment

* Address one more comment
2017-08-15 09:49:48 -07:00
Dongbo Wang 6d32293437 Add more tab completion tests (#4356)
* Add more TabCompletion tests

* Minor changes

* Add some more tests

* Add more tab completion tests

* Fix errors

* Add more test coverage

* Add 'AfterEach { Pop-Location }'

* Enable DSC resource name completion and address comments

* use both '/' and '\' in the path for completion

* Use a separate test for '\' and '/'
2017-08-03 15:26:20 -07:00
Travis Plunk 72a8de39b5 Due to the use of unsupported APIs, we must remove the Counter CmdLets in the Diagnostics Module until a better solution is found. (#4303) 2017-07-19 17:20:01 -07:00
Steve Lee 8f8580a408 Fix usage of -TestCases so that the parameters show up in the test case description (#4188) 2017-07-07 09:25:46 -07:00
Maria Romero 471f4e8a48 Add tab completion for Export-Counter -FileFormat parameter (#3856)
* add tab completion for -FileFormat parameter

* update expected error for invalid -FileFormat test case
2017-06-25 12:13:57 -07:00
Aditya Patwardhan 2ae5d071ce Fix about_* topic help issues and a few tab completion regressions (#4014) 2017-06-18 18:27:34 -07:00
Staffan Gustafsson 3125764476 Fix bug where native.exe --<tab> would not call native completer (#3633) 2017-06-07 16:34:44 -07:00
Staffan Gustafsson 8d744f2517 Use '<id> - <name>' as ToolTip and ListItemText when tab completing process ID (#3664) 2017-05-05 18:05:21 -07:00
Staffan Gustafsson f959c41e71 Add Hashtable tab completion for -Property of select-object (#3625)
Also added more tab completion tests.
2017-04-24 16:45:05 -07:00