Git Product home page Git Product logo

Comments (4)

gsscoder avatar gsscoder commented on August 9, 2024

Received. Thanks for reporting! I'll check ASAP...
Giacomo

from commandline.

gsscoder avatar gsscoder commented on August 9, 2024

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.
Try launch your app as:

app.exe --source d:/document.docx --output d:/document.xlsx -h 0 1 1 1 -c 0 2 1 2 --verbose

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!
Every progress will be posted here and source code will be updated.

Regards,
Giacomo

from commandline.

gsscoder avatar gsscoder commented on August 9, 2024

@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... :)

from commandline.

gsscoder avatar gsscoder commented on August 9, 2024
// 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.

from commandline.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.