GRAILS-1019: Allowing expressions to be used with the 'disabled' attribute for g...
[grails.git] / test / web / org / codehaus / groovy / grails / web / pages / ScanTests.java
blobc8ef370eefe70d636120190dcacd552e5df6943b
1 package org.codehaus.groovy.grails.web.pages;
3 import junit.framework.TestCase;
6 /**
7 * Tests the GSP lexer (Scan class).
8 *
9 * @author a.shneyderman
11 public class ScanTests extends TestCase {
13 public void testTagsCustomNamespace() {
14 String gsp =
15 "<tbody>\n" +
16 " <tt:form />\n" +
17 "</tbody>";
19 Scan s = new Scan (gsp);
20 int next;
21 while((next = s.nextToken()) != Tokens.EOF) {
22 if (next == Tokens.GSTART_TAG ||
23 next == Tokens.GEND_TAG) {
24 assertEquals("tt", s.getNamespace());
29 public void testTagsDefaultNamespace() {
30 String gsp =
31 "<tbody>\n" +
32 " <g:form />\n" +
33 "</tbody>";
35 Scan s = new Scan (gsp);
36 int next;
37 while((next = s.nextToken()) != Tokens.EOF) {
38 if (next == Tokens.GSTART_TAG ||
39 next == Tokens.GEND_TAG) {
40 assertEquals(GroovyPage.DEFAULT_NAMESPACE, s.getNamespace());