Package org.jnode.shell.bjorne

Examples of org.jnode.shell.bjorne.BjorneContext


    }

    @Test
    public void testExpand15() throws Exception {
        PathnamePattern.clearCache();
        BjorneContext context = new TestBjorneContext();
        Assert.assertEquals(true, context.isGlobbing());
        Assert.assertEquals(true, context.isTildeExpansion());
        if (new File("../README.txt").exists()) {
            CommandLine expansion = context.buildCommandLine(new BjorneToken("../README.*"));
            checkExpansion(expansion, new String[] {"../README.txt"});
            expansion = context.buildCommandLine(new BjorneToken("../README.\\*"));
            checkExpansion(expansion, new String[] {"../README.*"});
            expansion = context.buildCommandLine(new BjorneToken("\"../README.*\""));
            checkExpansion(expansion, new String[] {"../README.*"});
            expansion = context.buildCommandLine(new BjorneToken("\'../README.*\'"));
            checkExpansion(expansion, new String[] {"../README.*"});

            context.setGlobbing(false);
            expansion = context.buildCommandLine(new BjorneToken("../README.*"));
            checkExpansion(expansion, new String[] {"../README.*"});
        } else {
            System.err.println("skipping 'glob' tests ... no ../README.txt");
        }

View Full Code Here


    }

    @Test
    public void testExpand16() throws Exception {
        BjorneContext context = new TestBjorneContext();
        Assert.assertEquals(true, context.isGlobbing());
        Assert.assertEquals(true, context.isTildeExpansion());
        CommandLine expansion = context.buildCommandLine(new BjorneToken("~"));
        checkExpansion(expansion, new String[] {System.getProperty("user.home")});
        context.setTildeExpansion(false);
        expansion = context.buildCommandLine(new BjorneToken("~"));
        checkExpansion(expansion, new String[] {"~"});
    }
View Full Code Here

TOP

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

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.