Skip to content
This repository was archived by the owner on Dec 18, 2017. It is now read-only.

Allow no-throw behavior when command-line parser sees an unexpected option #530

Merged
merged 1 commit into from
Aug 19, 2014

Conversation

ChengTian
Copy link
Contributor

parent #520

@davidfowl
Copy link
Member

This needs unit tests verifying that the behavior is fixed and that the previous throwing of invalid arguments for k still throws.

@ChengTian
Copy link
Contributor Author

Added unit tests.

@@ -166,5 +166,141 @@ public void ShortNamesMayBeDefined()
Assert.Equal("one", first.Values[0]);
Assert.Equal("two", second.Values[0]);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None of these tests seem to define arguments in the test command. Isn't that the main test case?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is aim to fix the parent issue #520 , which is only related to handling unexpected arguments. Defining an argument in test command is adding an expected argument, which is non-relevant to this issue. Moreover, handling expected argument is already tested here:
https://github.com/aspnet/KRuntime/blob/allow-no-throw-on-unexpected-options/test/Microsoft.Framework.CommandLineUtils.Tests/CommandLineApplicationTests.cs#L32

@davidfowl
Copy link
Member

:shipit:

@ChengTian ChengTian merged commit 0895b05 into dev Aug 19, 2014
@ChengTian ChengTian deleted the allow-no-throw-on-unexpected-options branch August 19, 2014 18:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants