File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change 1- Import-Module PSScriptAnalyzer
1+ $directory = Split-Path - Parent $MyInvocation.MyCommand.Path
2+ $testRootDirectory = Split-Path - Parent $directory
3+ Import-Module PSScriptAnalyzer
4+ Import-Module (Join-Path $testRootDirectory ' PSScriptAnalyzerTestHelper.psm1' )
5+
26$missingMessage = " The member 'ModuleVersion' is not present in the module manifest."
37$missingMemberRuleName = " PSMissingModuleManifestField"
4- $directory = Split-Path - Parent $MyInvocation.MyCommand.Path
58$violationFilepath = Join-Path $directory " TestBadModule\TestBadModule.psd1"
69$violations = Invoke-ScriptAnalyzer $violationFilepath | Where-Object {$_.RuleName -eq $missingMemberRuleName }
710$noViolations = Invoke-ScriptAnalyzer $directory \TestGoodModule\TestGoodModule.psd1 | Where-Object {$_.RuleName -eq $missingMemberRuleName }
@@ -30,9 +33,9 @@ Describe "MissingRequiredFieldModuleManifest" {
3033 $violations.SuggestedCorrections.Count | Should Be $numExpectedCorrections
3134 }
3235
33-
34- It " has the right suggested correction" {
35- $expectedText = @'
36+ # On Linux, mismatch in line endings cause this to fail
37+ It " has the right suggested correction" - Skip:( Test-PSEditionCoreCLRLinux ) {
38+ $expectedText = @'
3639# Version number of this module.
3740ModuleVersion = '1.0.0.0'
3841'@
You can’t perform that action at this time.
0 commit comments