File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,24 @@ Describe "Test Path" {
7070 }
7171 }
7272
73+ Context " When given a glob" {
74+ It " Invokes on all the matching files" {
75+ $numFilesResult = (Invoke-ScriptAnalyzer - Path $directory \R* .ps1 | Select-Object - Property ScriptName - Unique).Count
76+ $numFilesExpected = Get-ChildItem - Path $directory \R* .ps1
77+ # numFilesResult -eq $numFilesExpected | Should Be $true
78+ }
79+ }
80+
81+ Context " When given a FileSystem PSDrive" {
82+ It " Recognizes the path" {
83+ $freeDrive = 69 .. 90 | % {([char ]$_ )+ " :" } | ? {! (Test-Path $_ )} | Select-Object - First 1
84+ New-PSDrive - Name $freeDrive [0 ] - PSProvider FileSystem - Root $directory
85+ $numFilesExpected = (Get-ChildItem - Path $freeDrive \* .ps1).Count
86+ $numFilesResult = (Invoke-ScriptAnalyzer - Path $freeDrive \R* .ps1 | Select-Object - Property ScriptName - Unique).Count
87+ # numFilesResult -eq $numFilesExpected | Should Be $true
88+ }
89+ }
90+
7391 Context " When given a directory" {
7492 $withoutPathWithDirectory = Invoke-ScriptAnalyzer - Recurse $directory \RecursionDirectoryTest
7593 $withPathWithDirectory = Invoke-ScriptAnalyzer - Recurse - Path $directory \RecursionDirectoryTest
You can’t perform that action at this time.
0 commit comments