You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2007/09/13 00:32:09 UTC
svn commit: r575108 -
/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/validate.groovy
Author: jdillon
Date: Wed Sep 12 15:32:05 2007
New Revision: 575108
URL: http://svn.apache.org/viewvc?rev=575108&view=rev
Log:
Add some comments as to what these closures do
Modified:
geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/validate.groovy
Modified: geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/validate.groovy
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/validate.groovy?rev=575108&r1=575107&r2=575108&view=diff
==============================================================================
--- geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/validate.groovy (original)
+++ geronimo/server/trunk/maven-plugins/car-maven-plugin/src/it/j2ee-system/validate.groovy Wed Sep 12 15:32:05 2007
@@ -17,6 +17,9 @@
* under the License.
*/
+/**
+ * Loads text from a file an normalizes its EOL-style for platform-safe validation.
+ */
def loadText = { filename ->
def file = new File(basedir, "$filename")
@@ -32,6 +35,9 @@
return text
}
+/**
+ * Asserts that the text of both files are the same in a platform-safe fasion.
+ */
def assertSame = { file1, file2 ->
def expect = loadText(file1)
def found = loadText(file2)