Skip to content

Commit 655ec2e

Browse files
Update New-MemoryMappedFile test to use relative path and remove size parameter
1 parent 89898bf commit 655ec2e

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

tests/MemoryMappedFile.Tests.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ param()
1212
Describe 'Module' {
1313
Context 'MemoryMappedFile' {
1414
It 'New-MemoryMappedFile' {
15-
$fileName = "$HOME\test.json"
16-
$size = 1024
17-
$mmf = New-MemoryMappedFile -Name 'shared' -Path $fileName -Size $size
15+
$path = './shared.json'
16+
$mmf = New-MemoryMappedFile -Name 'shared' -Path $path
17+
{ $mmf.Dispose() } | Should -Not -Throw
1818
$mmf | Should -Not -BeNullOrEmpty
19-
Test-Path $fileName | Should -BeTrue
19+
Test-Path $path | Should -BeTrue
2020
}
2121

2222
It 'Get-MemoryMappedFile' {

0 commit comments

Comments
 (0)