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
+
2
6
$missingMessage = " The member 'ModuleVersion' is not present in the module manifest."
3
7
$missingMemberRuleName = " PSMissingModuleManifestField"
4
- $directory = Split-Path - Parent $MyInvocation.MyCommand.Path
5
8
$violationFilepath = Join-Path $directory " TestBadModule\TestBadModule.psd1"
6
9
$violations = Invoke-ScriptAnalyzer $violationFilepath | Where-Object {$_.RuleName -eq $missingMemberRuleName }
7
10
$noViolations = Invoke-ScriptAnalyzer $directory \TestGoodModule\TestGoodModule.psd1 | Where-Object {$_.RuleName -eq $missingMemberRuleName }
@@ -30,9 +33,9 @@ Describe "MissingRequiredFieldModuleManifest" {
30
33
$violations.SuggestedCorrections.Count | Should Be $numExpectedCorrections
31
34
}
32
35
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 = @'
36
39
# Version number of this module.
37
40
ModuleVersion = '1.0.0.0'
38
41
'@
You can’t perform that action at this time.
0 commit comments