Commit graph

1661 commits

Author SHA1 Message Date
Mark Kraus 2dd549e34b Fix Code Page Parsing Isssue in Invoke-RestMethod (#8694) 2019-01-22 10:45:40 -08:00
Mark Kraus 67004aa224 Fix expect 100-continue Issue with Web Cmdlets (#8679)
Web Cmdlets will no longer forcibly remove Expect: 100-continue from web requests.
This was a legacy setting that needed to be there because of platform differences that have since been resolved in CoreFX.
2019-01-19 11:16:18 +05:00
Michael Klement 20919ee793 Allow 'name' as an alias key for 'label' in ConvertTo-Html, allow the 'width' entry to be an integer (#8426) 2019-01-18 11:02:22 -08:00
Mathias R. Jessen 59a3696f70 Allow user-specified underlying type for enums (#8329)
Fix #8028 

This change adds support for specifying the underlying type for an enum:

```powershell
enum MyEnum : long 
{
  A = 0x0FFFFFFFFFFFFFFF
  B
}
# or
enum MyByte : byte 
{
  A = 0x01
  B = 0x02
  C = 0x03
  D
}
```
2019-01-17 14:22:10 -08:00
Reece Dunham f29a04c1bd Remove appveyor environment checks (#8669) 2019-01-17 12:33:35 -08:00
Reece Dunham 41e63f6546 Create Support File (#8618) 2019-01-17 12:25:07 -08:00
Reece Dunham 9eb6fc927d docs(contributing): add link check information (#8659) 2019-01-16 15:30:55 -08:00
pougetat 4858afb613 Resolve :PAGER' if its path contains spaces (#8571) 2019-01-16 15:14:44 -08:00
PRASOON KARUNAN V 6b3e06893a Adding tests for PSDiagnostics Module (#8431) 2019-01-16 14:59:35 -08:00
Travis Plunk 03cd3a2548
Increase diagnosability of Link Checker failures (#8667)
Also use ThreadJobs for better perf
2019-01-16 14:28:10 -08:00
Ilya 782ef99465
Add support enum and char types in Format-Hex cmdlet (#8191) 2019-01-16 16:58:22 +05:00
Kirk Munro 41d9667307 Add -Stable to Sort-Object and related tests (#7862) 2019-01-15 17:14:39 -08:00
Sergey Vasin 279993bf39 Change Get-Help cmdlet -Parameter parameter so it accepts string arrays. (#8454) 2019-01-15 16:25:49 -08:00
Dongbo Wang c2dfae8ccb Fix 'FixupFileName' to not load resolved assembly during module discovery (#8634) 2019-01-15 16:22:25 -08:00
Travis Plunk 7bf4641444
Fix broken urls (#8653)
Fix broken URL
  - Also, move other static analysis tests into that CI.
  - Also, make the link analysis a pester test (partly to make sure the step fails in case of an error)
2019-01-15 16:20:45 -08:00
xtqqczze 6126624b63 Revise use of Start-Sleep cmdlet (#8633)
* Avoid use of sleep alias (follow-up to #8546)
* Specify default parameter name
* Shorten overly specific comments
2019-01-15 12:31:52 +05:00
Steve Lee c3cb6df809 Update 'CommandNotFound' fuzzy suggestion to only return unique results (#8640) 2019-01-14 14:28:15 -08:00
Jani 812456f84c Improve Start-Sleep cmdlet to accept fractional seconds (#8537) 2019-01-14 10:04:44 -08:00
Steve Lee 6fa5195589 Update fuzzy test to fix daily build (#8629) 2019-01-11 16:45:49 -08:00
Steve Lee 71e58f9439 Add the experimental feature 'PSUseAbbreviationExpansion' to support tab completion on abbreviated command names (#8109) 2019-01-10 16:11:43 -08:00
Steve Lee b87cd1c0a3 Add support to show suggestions on CommandNotFound exception (#8458)
* support fuzzy matching with get-command and on CommandNotFound exception, show suggestion
* fix CodeFactor issues
* change algorithm to use Damerau-Levenshtein Distance which is more useful in finding close matches
2019-01-10 13:35:30 -08:00
Steve Lee 9793ed2c68 Change hashtable to use OrdinalIgnoreCase to be case-insensitive in all Cultures (#8566)
Ubuntu18.04 seems to default to C.UTF-8 for LANG (representing InvariantCulture) which results in a case-sensitive hashtable since CurrentCultureIgnoreCase doesn't work for that culture. Fix is to use OrdinalIgnoreCase instead.
2019-01-10 09:11:43 +05:00
Kirk Munro 1729a682ee Make S.M.A.PowerShell.GetSteppablePipeline method public (#8055)
* make GetSteppablePipeline method public
* updated PowerShell member count
2019-01-09 15:31:09 -08:00
Ilya 6647b29f41
Fix LiteralPath in Import-Csv to bind to Get-ChildItem output (#8277)
Added new tests.
2019-01-09 18:49:15 +05:00
Michael Klement 73716e9792 Make scriptblock-based calculated properties work again in ConvertTo-Html (#8427) 2019-01-09 13:55:03 +05:00
Sergey Vasin 6f071f0ba5 Fix Join-String cmdlet FormatString parameter logic (#8449) 2019-01-09 11:06:20 +05:00
Steve Lee d6000fdea8 Allow Windows users in developer mode to create symlinks without elevation (#8534) 2019-01-08 10:43:24 -08:00
Steve Lee 64fcddcb53 Help function should only pass content to pager if content was found (#8528) 2019-01-08 09:56:56 -08:00
Steve Lee 031cbf0f16 Change clear-host to simply called [console]::clear and remove clear alias from Unix (#8603)
Based on @PowerShell/powershell-committee decision, standardizing on [Console]::Clear() on all platforms and removing clear alias on non-Windows.
2019-01-08 22:38:56 +05:00
Dongbo Wang 4a63201139 Remove 'en-us' from our doc links (#8602) 2019-01-07 17:11:17 -08:00
Steve Lee d51b5fdc30 help function shouldn't use pager for AliasHelpInfo (#8552) 2019-01-07 13:39:57 -08:00
Kirk Munro 23f6e8ff40 Add S.M.A.PowerShell.Create method overload with Runspace argument (#8057) 2019-01-07 11:04:42 -08:00
Ilya b8f9532b41 Style: Use the type alias 'string' instead of 'String' in places that are appropriate (#8573) 2019-01-07 10:46:00 -08:00
xtqqczze 379cbb60cd Correctly capitalize the ForEach operator in *.ps1 (#8583) 2019-01-06 17:00:56 +05:00
xtqqczze f0f301bc5e Avoid use of mkdir alias in *.ps1 and *.psm1 (#8582) 2019-01-04 14:31:24 +05:00
xtqqczze 1a3aadfc4e Regularize redirection operator spacing in *.ps1 and *.ps1m (#8581)
Add space after redirection operator.
2019-01-03 12:59:14 +05:00
Ilya dfd2f69369
Style: Change 'String.' to 'string.' (#8568) 2018-12-31 20:44:16 +05:00
Ilya f31750c0d1
Fix typo in AMSI test (#8561) 2018-12-29 18:16:50 +05:00
xtqqczze 70de294fea Remove use of cmdlet aliases from .\test\powershell (#8546) 2018-12-28 13:48:23 +05:00
xtqqczze b850d57c78 Style: Remove preceding spaces from C# preprocessor-type keywords (#8540) 2018-12-26 11:59:10 +05:00
Ilya d8af22c33b
Style: Change 'Byte{}' to 'byte[]' (#8525) 2018-12-24 11:23:18 +05:00
Steve Lee 4af3068566 Code cleanup: Add space after closing brace where needed (#8530)
* Update TestService

* Update WebListener

* Update Controllers

* Update ExpTest

* Update MyApp

* Update Logic

* Update Logic

* Update MyApp

* Update Microsoft.Management.Infrastructure.CimCmdlets

* Update Microsoft.PowerShell.Commands.Diagnostics

* Update Microsoft.PowerShell.ScheduledJob

* Update Microsoft.WSMan.Management

* Update Microsoft.WSMan.Runtime

* Update ResGen

* Update TypeCatalogGen

* Update commands

* Update Eventing

* Update Reader

* Update utility

* Update ShowCommand

* Update trace

* Update WebCmdlet

* Update Common

* Update CoreCLR

* Update common

* Update format-object

* Update format-wide

* Update out-file

* Update out-printer

* Update out-string

* Update OutGridView

* Update LocalAccounts

* Update Commands

* Update security

* Update CoreCLR

* Update DscSupport

* Update engine

* Update help

* Update logging

* Update namespaces

* Update security

* Update utils

* Update config

* Update perfCounters

* Update tracing

* Update cmdletization

* Update other

* Update cim

* Update xml

* Update CoreCLR

* Update common

* Update DefaultFormatters

* Update out-console

* Update out-textInterface

* Update DisplayDatabase

* Update Utilities

* Update COM

* Update ComInterop

* Update CommandCompletion

* Update debugger

* Update ExperimentalFeature

* Update hostifaces

* Update interpreter

* Update lang

* Update Modules

* Update parser

* Update runtime

* Update client

* Update commands

* Update common

* Update fanin

* Update server

* Update WireDataFormat

* Update Binding

* Update Operations

* Update interface

* Update cmdletization

* Update cim

* Update management

* Update WindowsTaskbarJumpList

* Update msh
2018-12-24 11:20:06 +05:00
Mathias R. Jessen 0e971a42bf Fix xml nesting bug in CustomSerializer.WriteMemberInfoCollection() (#8476)
WriteMemberInfoCollection() calls WriteEndElement() at most once, even if WriteStartElement() has been called more than once. This commit moves the WriteEndElement() call up immediately after the elements text value has been written.
2018-12-22 22:50:11 +05:00
Steve Lee 2eb7ca8309 Fix formatting of header of table when center aligned (#8497) 2018-12-22 12:57:44 +05:00
Dongbo Wang 2bfbcd4f07 Remove empty lines; correct space on closing square brackets, negative signs, and generic brackets (#8508) 2018-12-21 12:23:04 +05:00
Luke Jeremy 56fc426f8b Add -UseMinimalHeader to Start-Transcript to minimize transcript header (#8402) 2018-12-20 11:12:14 -08:00
Steve Lee 110f78b818 Add -RepeatHeader to Format-Table to enable repeating header for each screen full (#8481)
When using a screen reader or just getting the output of a table with lots of rows, the header is no longer on the screen and the columns may no longer make sense without the context.  This change adds a `-RepeatHeader` switch to `Format-Table` to enable re-outputting the header after every screen full (minus 1 row).  Expectation is that the user is piping the output to a pager (e.g. less) which uses the bottom row for pager information.  I followed the `AutoSize` parameter as the way to get the parameter from the cmdlet into the deep formatting object where it's needed.
2018-12-20 11:05:34 -08:00
Joel Sallow (/u/ta11ow) 64bbdbe61c Add Tests for ConfirmImpact Ratings (#8214) 2018-12-20 23:15:42 +05:00
Ilya c857392c34
Fix style issues in xUnit tests (#8465) 2018-12-18 21:11:21 +05:00
Ilya a9f106da58 Move xUnit tests in new folder (#8356)
## Motivation

I have a PR where there are many new xUnit tests.
It would also be useful to create new xUnit tests for public APIs.
The number of xUnit tests will increase and their ordering is required.

## PR Summary

- Move C# xUnit tests in new folder. This allows to put new xUnit tests in directory structure in accordance with directory structure where cs files are.
- Use an xUnit TestCaseOrderer attribute to sequentially process tests for `powershell.config.json`.
- Update README.md
- A race condition was fixed which allowed  to run all XUnit tests in single batch job.
2018-12-13 14:22:07 -08:00