[Fusionforge-commits] r10198 - trunk/tests/code/syntax

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Jul 8 10:34:01 CEST 2010


Author: lolando
Date: 2010-07-08 10:34:01 +0200 (Thu, 08 Jul 2010)
New Revision: 10198

Modified:
   trunk/tests/code/syntax/SyntaxTest.php
Log:
Added a check for empty last lines

Modified: trunk/tests/code/syntax/SyntaxTest.php
===================================================================
--- trunk/tests/code/syntax/SyntaxTest.php	2010-07-07 13:09:10 UTC (rev 10197)
+++ trunk/tests/code/syntax/SyntaxTest.php	2010-07-08 08:34:01 UTC (rev 10198)
@@ -76,4 +76,18 @@
 	    $output = `cd .. ; find gforge tests -name '*.pl' -type f | xargs pcregrep -l '\r$'`;
 	    $this->assertEquals('', $output);
     }
+
+    /**
+     * Ensure no script has an empty last line
+     */
+    public function testEmptyLastLine()
+    {
+	    $output = `cd .. ; find gforge tests -name '*.php' -type f | while read i ; do [ -z "\$(tail -n 1 \$i)" ] && echo \$i ; done`;
+	    $this->assertEquals('', $output);
+    }
 }
+	
+// Local Variables:
+// mode: php
+// c-file-style: "bsd"
+// End:




More information about the Fusionforge-commits mailing list