Examples of GroovyPageScanner


Examples of org.grails.web.pages.GroovyPageScanner

        String gsp =
            "<tbody>\n" +
            "  <tt:form />\n" +
            "</tbody>";

        GroovyPageScanner s = new GroovyPageScanner(gsp);
        int next;
        while ((next = s.nextToken()) != Tokens.EOF) {
            if (next == Tokens.GSTART_TAG ||
                next == Tokens.GEND_TAG) {
                assertEquals("tt", s.getNamespace());
            }
        }
    }
View Full Code Here

Examples of org.grails.web.pages.GroovyPageScanner

        String gsp =
            "<tbody>\n" +
            "  <g:form />\n" +
            "</tbody>";

        GroovyPageScanner s = new GroovyPageScanner(gsp);
        int next;
        while ((next = s.nextToken()) != Tokens.EOF) {
            if (next == Tokens.GSTART_TAG ||
                next == Tokens.GEND_TAG) {
                assertEquals(GroovyPage.DEFAULT_NAMESPACE, s.getNamespace());
            }
        }
    }
View Full Code Here

Examples of org.grails.web.pages.GroovyPageScanner

        }
    }
   
    public void testMaxHtmlLength() {
        String gsp = "0123456789ABCDEFGHIJK";
        GroovyPageScanner scanner = new GroovyPageScanner(gsp);
        scanner.setMaxHtmlLength(10);
        assertEquals(GroovyPageScanner.HTML, scanner.nextToken());
        assertEquals("0123456789", scanner.getToken());
        assertEquals(GroovyPageScanner.HTML, scanner.nextToken());
        assertEquals("ABCDEFGHIJ", scanner.getToken());
        assertEquals(GroovyPageScanner.HTML, scanner.nextToken());
        assertEquals("K", scanner.getToken());
        assertEquals(GroovyPageScanner.EOF, scanner.nextToken());
    }
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.