Package org.jnode.shell.syntax

Examples of org.jnode.shell.syntax.AlternativesSyntax


        }
    }

    @org.junit.Test
    public void testConstructor() {
        new AlternativesSyntax(new OptionSyntax("intArg", 'i'), new OptionSyntax("fileArg", 'f'),
                new OptionSyntax("flagArg", "xxx"));
    }
View Full Code Here


    @org.junit.Test
    public void testFormat() {
        Test test = new Test();
        Syntax syntax1 =
                new AlternativesSyntax(new OptionSyntax("intArg", 'i'), new OptionSyntax("fileArg",
                        'f'), new OptionSyntax("flagArg", "xxx"));
        Assert.assertEquals("( -i <intArg> ) | ( -f <fileArg> ) | --xxx",
                syntax1.format(test.getArgumentBundle()));
    }
View Full Code Here

    @org.junit.Test
    public void testOne() throws Exception {
        TestShell shell = new TestShell();
        shell.addAlias("cmd", "org.jnode.test.shell.syntax.AlternativesSyntaxTest$Test");
        shell.addSyntax("cmd", new AlternativesSyntax(new OptionSyntax("intArg", 'i'),
                new OptionSyntax("fileArg", 'f'), new OptionSyntax("flagArg", "xxx")));

        CommandLine cl;
        CommandInfo cmdInfo;
        Command cmd;
View Full Code Here

TOP

Related Classes of org.jnode.shell.syntax.AlternativesSyntax

Copyright © 2018 www.massapicom. 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.