8000 Increase code coverage of Get-ChildItem on file system. (#4342) · PowerShell/PowerShell@10a27b8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 10a27b8

Browse files
jeffbiadityapatwardhan
authored andcommitted
Increase code coverage of Get-ChildItem on file system. (#4342)
* Increase code coverage of Get-ChildItem on file system.
1 parent e38f0e7 commit 10a27b8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/powershell/Modules/Microsoft.PowerShell.Management/FileSystem.Tests.ps1

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ Describe "Basic FileSystem Provider Tests" -Tags "CI" {
8484
$dirContents.Count | Should Be 2
8585
}
8686

87+
It "Verify Get-ChildItem can get the name of a specified item." {
88+
$fileName = Get-ChildItem $testFile -Name
89+
$fileInfo = Get-ChildItem $testFile
90+
$fileName | Should BeExactly $fileInfo.Name
91+
}
92+
8793
It "Set-Content to a file" {
8894
$content = Set-Content -Value $testContent -Path $testFile -PassThru
8995
$content | Should BeExactly $testContent

0 commit comments

Comments
 (0)
0