Package jline.console.history

Examples of jline.console.history.MemoryHistory.previous()


        reader.setExpandEvents(true);

        String line = reader.readLine();
        assertEquals("foo ! bar", line);

        history.previous();
        assertEquals("foo \\! bar", history.current());

        reader = createConsole("cd c:\\docs\r\n");
        history = new MemoryHistory();
        reader.setHistory(history);
View Full Code Here


        reader.setExpandEvents(true);

        line = reader.readLine();
        assertEquals("cd c:\\docs", line);

        history.previous();
        assertEquals("cd c:\\docs", history.current());
    }

    @Test
    public void testExpansionAndHistoryWithEscapes() throws Exception {
View Full Code Here

        reader.setExpandEvents(false);

        String line = reader.readLine();
        assertEquals("foo ! bar", line);

        history.previous();
        assertEquals("foo ! bar", history.current());
    }

    @Test
    public void testMacro() throws Exception {
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.