Commit graph

13 commits

Author SHA1 Message Date
Steve Lee b7cb335f03
Update copyright notice to latest guidance (#12190) 2020-03-24 11:08:37 -07:00
Ilya 0dfeeb5203
Port GetProcessorArchitecture() (#11046) 2020-01-14 08:41:19 +05:00
Thomas Nieto b25e67e607 Remove RequireLicenseAcceptance default value (#11512) 2020-01-07 11:43:58 -08:00
pougetat a79ed1ef0f Make New-ModuleManifest consistent with Update-ModuleManifest (#9104) 2019-03-13 12:01: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
Klaudia Algiz 090f8761e8 Use new Pester syntax: -Parameter for Pester tests in engine. (#6298)
* Use new Pester syntax: -Parameter for Pester tests in engine.
2018-03-14 12:13:32 -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
Steve Lee 7437f3dd3a Encoding for New-ModuleManifest on all platforms should be UTF-8 NoBOM (#5923)
* encoding for new-modulemanifest on all platforms should be utf8nobom
* fix test
2018-01-17 16:37:53 -08:00
James Truher [MSFT] be700729d6 Unify cmdlets with parameter 'Encoding' to be of type System.Text.Encoding (#5080)
This unifies file encoding across the inbox cmdlets to be UTF-8 without a BOM for all platforms. This is a breaking change as cmdlets on windows have a number of different encodings. This supports better interoperability with tradition Linux shells as we are using the same encoding.

Validate that files are created with UTF-8 encoding without BOM
Update tests to validate Encoding parameter to new type and create new tests for
parameter type validation.

[Breaking Change] The '-Encoding Byte' has been removed from the filesystem provider cmdlets. A new parameter '-AsByteStream' is now added to indicate that a byte stream is required as input, or output will be a stream of bytes.
2017-10-23 19:46:27 -07:00
Steve Lee 2639cd89ce Autocorrected CRLF to LF (#4943)
Also, fix `Parser.Tests.ps1` after correcting CRLF.
2017-09-29 16:28:15 -07:00
Andrew e2e07b1830 Change New-ModuleManifest encoding to UTF8NoBOM on non-Windows platforms (#3940)
* Change New-ModuleManifest encoding to UTF8NoBOM

* Addressed PR feedback

* Fixed test for Travis CI

* Updated tests
2017-06-27 12:48:25 -07:00
Ilya e00161a8af Add autoload for TestLanguage.psm1 TestHelpers.psm1 (#3456)
* Add autoload for TestHelpers.psm1

Test.Helpers.psm1 was renamed to TestHelpers.psm1

* Resolve conflit and rebase Add autoload for TestLanguage.psm1

* Remove unneeded comments from PSD1 files

* Rename test modules

Remove approved verbs (Get-Verb) from module names.

* Enhance ShouldBeErrorId to output exception into pipeline for later analysis

* Remove unneeded comments

* Resolve merge conflict
2017-05-17 11:09:27 -07:00
Steve Lee ee9049b61f New-ModuleManifest was incorrectly checking if a Uri was well formed by using ToString() which just outputs the original (#3631)
string.  If the string was a uri with spaces, ToString() doesn't return the escaped version.  The AbsoluteUri property
should be used instead which returns an escaped absolute uri (if valid).

Also renamed TestModuleManfest.ps1 to TestModuleManifest.Tests.ps1 so that it gets picked up correctly as Pester test.

Since HelpInfoUri is just a string, ensure it is a valid absolute uri and escaped correctly whereas before it was just
an opaque string that wasn't validated.
2017-04-25 17:45:24 -07:00