Examples of PosixParser


Examples of org.apache.commons.cli.PosixParser

            .withLongOpt( debugOpt )
            .hasArg()
            .create( 'd' );
        Options options = new Options();
        options.addOption( debug );
        CommandLine commandLine = new PosixParser().parse( options, new String[]{"-d", "true"} );

        assertEquals("true", commandLine.getOptionValue( debugOpt ));
        assertEquals("true", commandLine.getOptionValue( 'd' ));
        assertTrue(commandLine.hasOption( 'd'));
        assertTrue(commandLine.hasOption( debugOpt));
View Full Code Here

Examples of org.apache.commons.cli.PosixParser

    extends TestCase
{
    public void test() throws Exception
    {
        Options options = buildCommandLineOptions();
        CommandLineParser parser = new PosixParser();
        String[] args = new String[] {"-t", "-something" };
        CommandLine commandLine;
        commandLine = parser.parse( options, args );
        assertEquals("-something", commandLine.getOptionValue( 't'));
    }
View Full Code Here

Examples of org.apache.felix.sigil.common.runtime.cli.PosixParser

    {
        FrameworkFactory factory = getFrameworkFactory();

        try
        {
            Parser parser = new PosixParser();
            CommandLine cl = parser.parse(options, args);

            if (cl.hasOption('?'))
            {
                printHelp();
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.