Package org.jnode.shell.bjorne

Examples of org.jnode.shell.bjorne.BjorneToken


    }

    @Test
    public void testSymbols2() throws ShellSyntaxException {
        BjorneTokenizer tokenizer = new BjorneTokenizer("; ;; | || & && < << > >>");
        BjorneToken token = tokenizer.next();
        Assert.assertEquals(TOK_SEMI, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_DSEMI, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_BAR, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_OR_IF, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_AMP, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_AND_IF, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_LESS, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_DLESS, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_GREAT, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_DGREAT, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_END_OF_STREAM, token.getTokenType());
    }
View Full Code Here


    }

    @Test
    public void testSymbols3() throws ShellSyntaxException {
        BjorneTokenizer tokenizer = new BjorneTokenizer(";;;|||&&&<<<>>>");
        BjorneToken token = tokenizer.next();
        Assert.assertEquals(TOK_DSEMI, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_SEMI, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_OR_IF, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_BAR, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_AND_IF, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_AMP, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_DLESS, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_LESSGREAT, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_DGREAT, token.getTokenType());
        token = tokenizer.next();
        Assert.assertEquals(TOK_END_OF_STREAM, token.getTokenType());
    }
View Full Code Here

TOP

Related Classes of org.jnode.shell.bjorne.BjorneToken

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.