Examples of PowersetSyntax


Examples of org.jnode.shell.syntax.PowersetSyntax

        }
    }

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

Examples of org.jnode.shell.syntax.PowersetSyntax

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

Examples of org.jnode.shell.syntax.PowersetSyntax

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

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

Examples of org.jnode.shell.syntax.PowersetSyntax

    @org.junit.Test
    public void testLazy() throws Exception {
        TestShell shell = new TestShell();
        shell.addAlias("cmd", "org.jnode.test.shell.syntax.PowersetSyntaxTest$Test");
        shell.addSyntax("cmd", new SequenceSyntax(new PowersetSyntax(
                new OptionSyntax("intArg", 'i'), new OptionSyntax("fileArg", 'f')),
                new RepeatSyntax(new OptionSyntax("otherArg", 'i'))));

        CommandLine cl;
        CommandInfo cmdInfo;
View Full Code Here

Examples of org.jnode.shell.syntax.PowersetSyntax

    @org.junit.Test
    public void testEager() throws Exception {
        TestShell shell = new TestShell();
        shell.addAlias("cmd", "org.jnode.test.shell.syntax.PowersetSyntaxTest$Test");
        shell.addSyntax("cmd", new SequenceSyntax(new PowersetSyntax(null, true, null,
                new OptionSyntax("intArg", 'i'), new OptionSyntax("fileArg", 'f')),
                new RepeatSyntax(new OptionSyntax("otherArg", 'i'))));

        CommandLine cl;
        CommandInfo cmdInfo;
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.