-
Notifications
You must be signed in to change notification settings - Fork 293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Two consecutive Arrays causes second one not to be read #6
Comments
Received. Thanks for reporting! I'll check ASAP... |
Hi, in my first investigation it seems that the problem can be avoided forcing the use of option with just short name when mapped as OptionArray.
In this case for consistency you should remove long name from option definition to avoid confusion. Warning, this is just a workaround! Not the final solution. Summer heat allowing :D , I'll try to write some new unit tests for isolate this issue and finally solve it! Regards, |
@m1gu3l I'm writing a new unit test that should definitely solve the problem. Thank :D for your infinite patient! Also forgive for not trying merging PR, I was accustomed to use SVN in my internal organization and getting really familiar with Git/GitHub just in these last times. I really appreciate any help and please never see a bad intention when some PR is not merged, a reply is not given soon or similar things... :) |
// Given
var options = new OptionsWithTwoArrays();
var parser = new Parser();
var argumets = new[] { "--source", @"d:/document.docx", "--output", @"d:/document.xlsx",
"--headers", "1", "2", "3", "4", // first array
"--content", "5", "6", "7", "8", // second array
"--verbose"
};
// When
var result = parser.ParseArguments(argumets, options);
// Than
result.Should().BeTrue();
options.Headers.Should().HaveCount(c => c == 4);
options.Headers.Should().ContainInOrder(new uint[] { 1, 2, 3, 4 });
options.Content.Should().HaveCount(c => c == 4);
options.Content.Should().ContainInOrder(new uint[] { 5, 6, 7, 8 }); If possible, please provide feedback. |
app.exe --source d:/document.docx --output d:/document.xlsx --headers 0 1 1 1 --content 0 2 1 2 --verbose
.NET 4.0, Windows 7, C# Express 2010
The text was updated successfully, but these errors were encountered: