Package org.python.pydev.parser.fastparser

Examples of org.python.pydev.parser.fastparser.TabNannyDocIterator


    }

    public void testIterator5d() throws Exception {
        String str = "#comment";
        Document d = new Document(str);
        TabNannyDocIterator it = new TabNannyDocIterator(d);
        assertTrue(!it.hasNext());
    }
View Full Code Here


    public void testIterator6() throws Exception {
        String str = "    #comment   what's happening\\\n" + //escape is in comment... (so, it's not considered the same line)
                "    pass";
        Document d = new Document(str);
        TabNannyDocIterator it = new TabNannyDocIterator(d);
        assertEquals("    ", it.next().o1);
        assertEquals("    ", it.next().o1);
        assertTrue(!it.hasNext());
    }
View Full Code Here

    public void testIterator6b() throws Exception {
        String str = "    #comment   what's happening\\\n" + //escape is in comment... (so, it's not considered the same line)
                "    pass";
        Document d = new Document(str);
        TabNannyDocIterator it = new TabNannyDocIterator(d, true, false);
        assertEquals("    ", it.next().o1);
        assertEquals("    ", it.next().o1);
        assertTrue(!it.hasNext());
    }
View Full Code Here

    public void testIterator6a() throws Exception {
        String str = "    #comment   what's happening\r\n" +
                "    #comment   what's happening2\r\n" +
                "    pass\r\n";
        Document d = new Document(str);
        TabNannyDocIterator it = new TabNannyDocIterator(d);
        assertEquals("    ", it.next().o1);
        assertEquals("    ", it.next().o1);
        assertEquals("    ", it.next().o1);
        assertTrue(!it.hasNext());
    }
View Full Code Here

    public void testIterator6c() throws Exception {
        String str = "    #comment   what's happening\r\n" +
                "    #comment   what's happening2\r\n" +
                "    pass\r\n";
        Document d = new Document(str);
        TabNannyDocIterator it = new TabNannyDocIterator(d, true, false);
        assertEquals("    ", it.next().o1);
        assertEquals("    ", it.next().o1);
        assertEquals("    ", it.next().o1);
        assertTrue(!it.hasNext());
    }
View Full Code Here

    public void testIterator7() throws Exception {
        String str = "    g g g \t g\\\n" + //escape considered
                "    pass";
        Document d = new Document(str);
        TabNannyDocIterator it = new TabNannyDocIterator(d);
        assertEquals("    ", it.next().o1);
        assertTrue(!it.hasNext());
    }
View Full Code Here

    public void testIterator7a() throws Exception {
        String str = "    g g g \t g\\\n" + //escape considered
                "    pass";
        Document d = new Document(str);
        TabNannyDocIterator it = new TabNannyDocIterator(d, true, false);
        assertEquals("    ", it.next().o1);
        assertTrue(!it.hasNext());
    }
View Full Code Here

    public void testIterator8() throws Exception {
        String str = "{g }\n" +
                "    pass";
        Document d = new Document(str);
        TabNannyDocIterator it = new TabNannyDocIterator(d);
        assertEquals("    ", it.next().o1);
        assertTrue(!it.hasNext());
    }
View Full Code Here

    public void testIterator8a() throws Exception {
        String str = "{g }\n" +
                "    pass";
        Document d = new Document(str);
        TabNannyDocIterator it = new TabNannyDocIterator(d, true, false);
        assertEquals("", it.next().o1);
        assertEquals("    ", it.next().o1);
        assertTrue(!it.hasNext());
    }
View Full Code Here

        String str = "{g \n" +
                " ( ''' thnehouno '''\n" +
                "}\n" +
                "    pass";
        Document d = new Document(str);
        TabNannyDocIterator it = new TabNannyDocIterator(d, true, false);
        assertEquals("", it.next().o1);
        assertEquals("    ", it.next().o1);
        assertTrue(!it.hasNext());
    }
View Full Code Here

TOP

Related Classes of org.python.pydev.parser.fastparser.TabNannyDocIterator

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.