Commit graph

36 commits

Author SHA1 Message Date
Aditya Patwardhan
cb8165eeef
Move PSNullConditionalOperators feature out of experimental (#13529) 2020-08-27 10:11:01 -07:00
Robert Holt
3dfd95a09f
Ensure null-coalescing LHS is evaluated only once (#12667) 2020-05-16 21:36:15 +05:00
xtqqczze
f4382202ae
Use correct casing for cmdlet name and cmdlet parameter name in *.ps1 files (#12584) 2020-05-07 17:00:30 +05:00
Steve Lee
b7cb335f03
Update copyright notice to latest guidance (#12190) 2020-03-24 11:08:37 -07:00
Steve Lee
495dea0783
Move to .NET 5 preview.1 (#12140) 2020-03-19 11:27:13 -07:00
Dongbo Wang
a4c32bc337
Revert the PRs that made DBNull.Value and NullString.Value treated as $null (#11648) 2020-01-29 14:13:05 -08:00
xtqqczze
920b671fb4 Unify pester test syntax for the arguments of -BeOfType (#11558) 2020-01-24 11:00:37 -08:00
xtqqczze
e0d2e2aade Correct case of $PSHOME special variable 2020-01-13 19:35:33 +00:00
xtqqczze
225164037f Correct case of $PID special variable 2020-01-13 19:34:38 +00:00
xtqqczze
a051666baf Correct case of $input special variable 2020-01-13 19:18:44 +00:00
Aditya Patwardhan
2dbb5717ce Make null member access tests as string to avoid parsing errors (#11385)
* Make null member access tests as string to avoid parsing errors

* Add PSNullConditionalOperators feature to testmetadata.json

* Add Parsing tests to be skipped

* Add tabcompletion tests
2019-12-21 00:14:07 +00:00
Ilya
54e6199bbb Use invariant culture string conversion for -replace operator (#10954) 2019-12-19 09:50:46 -08:00
Steve Lee
ed1f6e3144 Make approved features non-experimental (#11303) 2019-12-10 15:41:43 -08:00
Aditya Patwardhan
2579c00a20 Support null-conditional operators ?. and ?[] in PowerShell language (#10960) 2019-11-15 16:39:53 -08:00
Robert Holt
ad12b14517 Stop blindly setting $? to true for ParenExpression, SubExpression and ArrayExpression (#11040) 2019-11-15 11:57:45 -08:00
Robert Holt
2f4ed146ae Fix pure expressions setting $? in pipeline chains (#10836) 2019-10-18 14:57:56 -07:00
Robert Holt
2a518fcfe2 Support the pipeline chain operators && and || in PowerShell language (#9849) 2019-10-17 14:43:46 -07:00
Aditya Patwardhan
425bc36a6f Implement Null Coalescing and Null Coalescing assignment operators (#10636) 2019-10-17 10:21:24 -07:00
Dongbo Wang
5069c7d6a6 Support ternary operator in PowerShell language (#10367) 2019-09-04 13:22:33 -07:00
Jacob Scott
f222a686c5 Support negative numbers in -split operator (#8960) 2019-06-03 16:33:54 -07:00
Sergey Vasin
3b3160841e Standardize Pester syntax in 'ReplaceOperator.Tests.ps1' (#7963) 2018-10-08 23:15:53 -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
Klaudia Algiz
ceef2e37e9 Use new Pester syntax: -Parameter for Pester tests in Language. (#6304) 2018-03-21 10:47:08 -07:00
Dongbo Wang
7721042fd5 Pass the 'Match' object to $_ for the substitute script block in '-replace' operation (#6029) 2018-03-14 09:43:57 -07:00
Mathias R. Jessen
915639a177 Add lambda support to -replace operator
Add support for replacement lambdas when using the -replace operator.
Requires minimal changes to existing code by using the following overload:
    Regex.Replace(string input, MatchEvaluator evaluator)
when a ScriptBlock is passed in as the replacement argument.
2018-03-14 09:43:57 -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
Ilya
0ad9fc9d70
[breaking-change] Fix range operator (#5732)
Breaking-change:  "0".."9" returns [char] previously in PowerShell Core (6.0.0, 6.0.1), now it returns [int]. After the change, the behavior is the same as in Windows PowerShell.
2018-02-11 14:22:45 +04:00
Dongbo Wang
73c6a73752 Fix line endings with LF (#5288) 2017-10-31 16:31:41 -07:00
Mathias R. Jessen
9b32c1d039 Add char range overload to DotDot operator (#5026) 2017-10-28 10:47:10 -07:00
Dan Travison
a3e129c586 Fix tests that incorrectly use ShouldBeErrorId (#4793) 2017-09-18 09:24:55 -07:00
Ilya
fc9d798b77 Enable use 'Singleline,Multiline' option in split operator (#4721)
Fix #4712
2017-09-08 09:23:38 -07:00
Steve Lee
db813b6bae add test coverage for -notcontains, -is, -isnot operators (#4179)
* added test coverage for -notcontains, -is, -isnot operators

* cleaned up tests to use -TestCases, added missing -cnotcontains test
2017-07-11 12:27:04 -07:00
Jason Shirk
02b5f357a2 Remove trailing whitespace (#3001) 2017-01-16 13:31:14 -08:00
Dongbo Wang
5fbde6eb40 Fix bytewise operators to work on enum types with 'System.Byte' as the underlying type (#2411) 2016-10-03 15:24:39 -07:00
James Truher
9e225ccae2 changes tags for tests
Start using tags CI, Feature, Scenario
2016-07-27 12:06:51 -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