Download PowerShell-master/test/xUnit/csharp/test_WildcardPattern.cs from MegaBites-AI/Windows-powershell: direct link, hf CLI and curl.
- Browser
- Download file 2.65 kB
-
https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/test/xUnit/csharp/test_WildcardPattern.cs
- Command line
-
hf download hf://datasets/MegaBites-AI/Windows-powershell/PowerShell-master/test/xUnit/csharp/test_WildcardPattern.cs
-
curl -L -o test_WildcardPattern.cs https://huggingface.co/datasets/MegaBites-AI/Windows-powershell/resolve/main/PowerShell-master/test/xUnit/csharp/test_WildcardPattern.cs
2.65 kB
| // Copyright (c) Microsoft Corporation. | |
| // Licensed under the MIT License. | |
| using System; | |
| using System.Management.Automation; | |
| using Xunit; | |
| namespace PSTests.Parallel | |
| { | |
| public class WildcardPatternTests | |
| { | |
| [] | |
| public void TestEscape_Null() | |
| { | |
| Assert.Throws<System.Management.Automation.PSArgumentNullException>(delegate { WildcardPattern.Escape(null); }); | |
| } | |
| [] | |
| public void TestEscape_Empty() | |
| { | |
| Assert.Equal(WildcardPattern.Escape(string.Empty), string.Empty); | |
| } | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| [] | |
| public void TestEscape_String(string source, string expected) | |
| { | |
| Assert.Equal(WildcardPattern.Escape(source), expected); | |
| } | |
| [] | |
| [] | |
| [] | |
| [] | |
| public void TestEscape_String_NotEscape(string source, string expected) | |
| { | |
| Assert.Equal(WildcardPattern.Escape(source, new[] { '*', '?', '[', ']' }), expected); | |
| } | |
| [] | |
| public void TestUnescape_Null() | |
| { | |
| Assert.Throws<System.Management.Automation.PSArgumentNullException>(delegate { WildcardPattern.Unescape(null); }); | |
| } | |
| [] | |
| public void TestUnescape_Empty() | |
| { | |
| Assert.Equal(WildcardPattern.Unescape(string.Empty), string.Empty); | |
| } | |
| [] | |
| [] | |
| [] | |
| [] | |
| public void TestUnescape_String(string source, string expected) | |
| { | |
| Assert.Equal(WildcardPattern.Unescape(source), expected); | |
| } | |
| } | |
| } | |