X-Git-Url: https://scm.fusionforge.org/anonscm/gitweb?p=fusionforge%2Ffusionforge.git;a=blobdiff_plain;f=tests%2Fcode%2Fsyntax%2FSyntaxTest.php;h=c726808976f6e69a6ca3aabbe88b55793327f677;hp=ab8ca397fa9d8a62535ec0d9d36dbb93a2604de7;hb=31991cedbdc713c255e6c983048b9970ca75c092;hpb=1204c7cd70ae679c6a38ad3e3e10785050d3e020 diff --git a/tests/code/syntax/SyntaxTest.php b/tests/code/syntax/SyntaxTest.php index ab8ca39..c726808 100644 --- a/tests/code/syntax/SyntaxTest.php +++ b/tests/code/syntax/SyntaxTest.php @@ -41,19 +41,21 @@ class Syntax_Tests extends PHPUnit_Framework_TestCase public function testUTF8Chars() { $root = dirname(dirname(dirname(dirname(__FILE__)))); - $output = `find $root/src $root/tests -name '*.php' -type f | xargs isutf8`; + // We don't pass syntax tests on 3rd party libraries in src/lib/vendor + $exclude_third_party_libs="-path '$root/src/lib/vendor' -prune -o "; + $output = `find $root/src $root/tests $exclude_third_party_libs -name '*.php' -type f -print | xargs isutf8`; $this->assertEquals('', $output); - $output = `find $root/src $root/tests -name '*.css' -type f | xargs isutf8`; + $output = `find $root/src $root/tests $exclude_third_party_libs -name '*.css' -type f -print | xargs isutf8`; $this->assertEquals('', $output); - $output = `find $root/src $root/tests -name '*.sql' -type f | xargs isutf8`; + $output = `find $root/src $root/tests $exclude_third_party_libs -name '*.sql' -type f -print | xargs isutf8`; $this->assertEquals('', $output); - $output = `find $root/src $root/tests -name '*.sh' -type f | xargs isutf8`; + $output = `find $root/src $root/tests $exclude_third_party_libs -name '*.sh' -type f -print | xargs isutf8`; $this->assertEquals('', $output); - $output = `find $root/src $root/tests -name '*.pl' -type f | xargs isutf8`; + $output = `find $root/src $root/tests $exclude_third_party_libs -name '*.pl' -type f -print | xargs isutf8`; $this->assertEquals('', $output); - $output = `find $root/src $root/tests -name '*.tmpl' -type f | xargs isutf8`; + $output = `find $root/src $root/tests $exclude_third_party_libs -name '*.tmpl' -type f -print | xargs isutf8`; $this->assertEquals('', $output); - $output = `find $root/src $root/tests -name '*.xml' -type f | xargs isutf8`; + $output = `find $root/src $root/tests $exclude_third_party_libs -name '*.xml' -type f -print | xargs isutf8`; $this->assertEquals('', $output); } @@ -92,7 +94,9 @@ class Syntax_Tests extends PHPUnit_Framework_TestCase public function testEmptyLastLine() { $root = dirname(dirname(dirname(dirname(__FILE__)))); - $output = `find $root/src $root/tests -name '*.php' -type f | while read i ; do [ -s \$i ] && [ -z "\$(tail -n 1 \$i)" ] && echo \$i ; done`; + // We don't pass syntax tests on 3rd party libraries in src/lib/vendor + $exclude_third_party_libs="-path '$root/src/lib/vendor' -prune -o "; + $output = `find $root/src $root/tests $exclude_third_party_libs -name '*.php' -type f -print | while read i ; do [ -s \$i ] && [ -z "\$(tail -n 1 \$i)" ] && echo \$i ; done`; $this->assertEquals('', $output); }