Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
anamnavi committed Oct 23, 2023
1 parent e01734d commit 8d239d0
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/PSScriptFileInfoTests/TestPSScriptFile.Tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,11 @@ Describe "Test Test-PSScriptFileInfo" -tags 'CI' {

Test-PSScriptFileInfo $scriptFilePath | Should -Be $true
}

It "determine script with whitespace before closing comment is valid" {
$scriptName = "ScriptWithWhitespaceBeforeClosingComment.ps1"
$scriptFilePath = Join-Path $script:testScriptsFolderPath -ChildPath $scriptName

Test-PSScriptFileInfo $scriptFilePath | Should -Be $true
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

<#PSScriptInfo
.VERSION 1.0
.GUID 3951be04-bd06-4337-8dc3-a620bf539fbd
.AUTHOR annavied
.COMPANYNAME
.COPYRIGHT
.TAGS
.LICENSEURI
.PROJECTURI
.ICONURI
.EXTERNALMODULEDEPENDENCIES
.REQUIREDSCRIPTS
.EXTERNALSCRIPTDEPENDENCIES
.RELEASENOTES
.PRIVATEDATA
#>

<#
.DESCRIPTION
this is a test for a script that will be published remotely
#>
Param()

0 comments on commit 8d239d0

Please sign in to comment.