jdaugherty commented on code in PR #14876:
URL: https://github.com/apache/grails-core/pull/14876#discussion_r2187477870


##########
grails-gsp/plugin/src/test/groovy/org/grails/web/pages/ParseSpec.groovy:
##########
@@ -0,0 +1,345 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    https://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.grails.web.pages
+
+import grails.core.DefaultGrailsApplication
+import grails.core.GrailsApplication
+import grails.util.GrailsWebMockUtil
+import grails.util.GrailsWebUtil
+import grails.web.pages.GroovyPagesUriService
+import groovy.transform.CompileStatic
+import org.codehaus.groovy.runtime.IOGroovyMethods
+import org.grails.gsp.GroovyPage
+import org.grails.gsp.compiler.GroovyPageParser
+import org.grails.taglib.GrailsTagException
+import org.grails.web.servlet.mvc.GrailsWebRequest
+import org.grails.web.util.GrailsApplicationAttributes
+import org.junit.jupiter.api.Assertions
+import org.springframework.mock.web.MockServletContext
+import org.springframework.web.context.WebApplicationContext
+import org.springframework.web.context.request.RequestContextHolder
+import org.springframework.web.context.support.GenericWebApplicationContext
+import spock.lang.PendingFeature
+import spock.lang.Specification
+
+/**
+ * Tests the GSP parser.  This can detect issues caused by improper
+ * GSP->Groovy conversion.  Normally, to compare the code, you can
+ * run the page with a showSource parameter specified.
+ * <p>
+ * The methods parseCode() and trimAndRemoveCR() have been added
+ * to simplify test case code.
+ */
+class ParseSpec extends Specification {
+    static final String GSP_FOOTER = """public static final Map JSP_TAGS = new 
HashMap()
+protected void init() {
+\tthis.jspTags = JSP_TAGS
+}
+public static final String CONTENT_TYPE = 'text/html;charset=UTF-8'
+public static final long LAST_MODIFIED = 0L
+public static final String EXPRESSION_CODEC = 'HTML'
+public static final String STATIC_CODEC = 'none'
+public static final String OUT_CODEC = 'none'
+public static final String TAGLIB_CODEC = 'none'
+}
+"""
+
+    void "parse"() {

Review Comment:
   Isn't def for returning a type?  Does any test return a type? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to