Match array instead of testing elements

So that we can ignore the ordering from the regexp
This commit is contained in:
Zachary Folwick
2015-08-28 17:03:42 -07:00
committed by Andrew Schwartzmeyer
parent 10c772829d
commit 534de9d15f
+4 -3
View File
@@ -46,9 +46,10 @@ ls
Test-Path $FullyQualifiedTestFile | Should Be $true
Test-Path $FullyQualifiedTestFile2 | Should Be $true
( Split-Path ./tmp/*estf*.ps1 -Leaf -Resolve ).GetType().BaseType.Name | Should Be "Array"
( Split-path ./tmp/*estf*.ps1 -Leaf -Resolve )[0] | Should Be $testfile
( Split-path ./tmp/*estf*.ps1 -Leaf -Resolve )[1] | Should Be $testfile2
$actual = ( Split-Path ./tmp/*estf*.ps1 -Leaf -Resolve )
$actual.GetType().BaseType.Name | Should Be "Array"
$actual | Should Match $testfile
$actual | Should Match $testfile2
Remove-Item $FullyQualifiedTestFile, $FullyQualifiedTestFile2