Team Ai
Datasetpublic

MegaBites-AI/Windows-powershell

sourceHugging Facemitupdated 6mo agoView on Hugging Face
0likes372downloads
ItemProperty.Tests.ps122 linesDownload Raw Back to Microsoft.PowerShell.Management
1# Copyright (c) Microsoft Corporation.2# Licensed under the MIT License.3Describe "Simple ItemProperty Tests" -Tag "CI" {4    It "Can retrieve the PropertyValue with Get-ItemPropertyValue" {5        Get-ItemPropertyValue -Path $TESTDRIVE -Name Attributes | Should -Be "Directory"6    }7    It "Can clear the PropertyValue with Clear-ItemProperty" {8        Setup -f file1.txt9        Set-ItemProperty $TESTDRIVE/file1.txt -Name Attributes -Value ReadOnly10        Get-ItemPropertyValue -Path $TESTDRIVE/file1.txt -Name Attributes | Should -Match "ReadOnly"11        Clear-ItemProperty $TESTDRIVE/file1.txt -Name Attributes12        Get-ItemPropertyValue -Path $TESTDRIVE/file1.txt -Name Attributes | Should -Not -Match "ReadOnly"13    }14    # these cmdlets are targeted at the windows registry, and don't have an linux equivalent15    Context "Registry targeted cmdlets" {16        It "Copy ItemProperty" -Pending { }17        It "Move ItemProperty" -Pending { }18        It "New ItemProperty" -Pending { }19        It "Rename ItemProperty" -Pending { }20    }21}22