mirror of https://github.com/raandree/NTFSSecurity
Tree:
35a929ac66
master
4.2.6
4.2.4
4.2.3
5.0.0-rc9
5.0.0-rc8
5.0.0-rc7
5.0.0-rc6
5.0.0-rc5
5.0.0-rc4
5.0.0-rc3
5.0.0-rc2
5.0.0-rc1
${ noResults }
1 Commits (35a929ac6654dea73476f3f958fbf3f5ad9c812a)
| Author | SHA1 | Message | Date |
|---|---|---|---|
|
|
112db810e0 |
test(items): assert the cmdlets that the judged matrix found untested
Add Tests\ParameterSets.Items.Tests.ps1, closing TestNeeded gaps the judged parameter-set matrix found for Copy-Item2, Get-ChildItem2, Get-Item2, Move-Item2, Remove-Item2, Test-Path2, Get-FileHash2, Get-DiskSpace, New-NTFSHardLink, Get-NTFSHardLink, New-NTFSSymbolicLink, Enable-Privileges, Disable-Privileges, and Get-Privileges: - Pipeline input by value for Copy-Item2, Move-Item2, Get-ChildItem2, Get-Item2, and Remove-Item2 (never exercised before), including continuation past a missing item and AlphaFS objects piped from Get-ChildItem2. - An empty string, $null, a piped empty string, or an empty array element for -Path/-Target is rejected by ValidateNotNullOrEmpty and never falls back to the current location, for Copy-Item2, Move-Item2, Remove-Item2, New-NTFSHardLink, and New-NTFSSymbolicLink. Verified by running against the built module in both PowerShell editions before being pinned. - Get-NTFSHardLink error categories, output type, and positional binding. - Pipeline continuation (Select-Object -First 1) for New-NTFSHardLink and New-NTFSSymbolicLink, and a successful link after an earlier failure in the same New-NTFSSymbolicLink call. - Enable-Privileges and Disable-Privileges error paths (SecurityError, Security2.AdjustPriviledgeException), runnable on any token. - Get-DiskSpace with a valid and an invalid drive letter together in either order, and positional/lower-case binding. - Get-Privileges compared against whoami /priv for the five privileges that both name the same way. - Get-FileHash2 pipeline objects with -Algorithm, and a locked path before a valid one with its error category and a relative-path hash. Every It asserts persisted state, an ErrorId/category/target, continuation, or an output type; none asserts only an English message. All four runtime configurations (elevated/basic user x Windows PowerShell 5.1/PowerShell 7) pass with 0 failures; two symbolic-link-privilege-gated tests skip on the basic-user configurations and run on both elevated ones. Mutation testing against 8 one-statement changes in a separate, discarded worktree confirmed each targeted test fails for the right reason; production sources were restored exactly after every mutation and no production code changed here. Does not pin the Get-ChildItem2 -Filter dot rules, the Decision 22 link and move/copy behaviors, the PrivilegeEnabler class, or the owner-restore handlers. A probe of Get-NTFSHardLink and New-NTFSHardLink -PassThru through a subst-mapped drive found a pre-existing defect (reported separately, not fixed or pinned here): both combine the apparent drive root with the volume-relative hard-link names from Windows, which throws FileNotFoundException once the drive's root differs from the real NTFS volume root. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: AI Assistant <ai@example.com> |
3 weeks ago |