CanGetProcessThreadForManagedThread() test now only runs on Windows systems; removed unused variable from expression tree cloner; removed unused variable from unit test of weak collection; fixed test issue parsing command lines relying on current platform being windows; removed unused variable from Semaphore class
git-svn-id: file:///srv/devel/repo-conversion/nusu@251 d2e56fa2-650e-0410-a79f-9358c0239efd
This commit is contained in:
parent
48e016d956
commit
61c858cb1c
5 changed files with 28 additions and 16 deletions
|
@ -570,8 +570,21 @@ namespace Nuclex.Support.Parsing {
|
|||
/// Tests whether the existence of named arguments can be checked
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void TestHasArgument() {
|
||||
CommandLine test = CommandLine.Parse("/first:x /second:y /second:z third");
|
||||
public void HasArgumentWorksForWindowsStyleArguments() {
|
||||
CommandLine test = CommandLine.Parse("/first:x /second:y /second:z third", true);
|
||||
|
||||
Assert.IsTrue(test.HasArgument("first"));
|
||||
Assert.IsTrue(test.HasArgument("second"));
|
||||
Assert.IsFalse(test.HasArgument("third"));
|
||||
Assert.IsFalse(test.HasArgument("fourth"));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tests whether the existence of named arguments can be checked
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void HasArgumentWorksForUnixStyleArguments() {
|
||||
CommandLine test = CommandLine.Parse("--first=x --second=y --second=z third", false);
|
||||
|
||||
Assert.IsTrue(test.HasArgument("first"));
|
||||
Assert.IsTrue(test.HasArgument("second"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue