diff options
author | Chad Kieffer <ckieffer@gmail.com> | 2009-08-30 22:33:12 -0600 |
---|---|---|
committer | Chad Kieffer <ckieffer@gmail.com> | 2009-08-30 22:33:12 -0600 |
commit | ce733e0f481e34f213d159cbb05dd6377cec4f54 (patch) | |
tree | 046818b9a56014849ee5a8054f739862cb115f68 /modules/gallery/tests/File_Structure_Test.php | |
parent | 93b542ccd8a64bdd037d0e4824be06cb9fe6ad49 (diff) | |
parent | 7015948357f91e79bb10595cd7c6bc2513d0863e (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'modules/gallery/tests/File_Structure_Test.php')
-rw-r--r-- | modules/gallery/tests/File_Structure_Test.php | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/modules/gallery/tests/File_Structure_Test.php b/modules/gallery/tests/File_Structure_Test.php index 8a97e00b..9018f4c6 100644 --- a/modules/gallery/tests/File_Structure_Test.php +++ b/modules/gallery/tests/File_Structure_Test.php @@ -177,10 +177,20 @@ class File_Structure_Test extends Unit_Test_Case { new GalleryCodeFilterIterator( new RecursiveIteratorIterator( new RecursiveDirectoryIterator(DOCROOT)))); + $errors = array(); foreach ($dir as $file) { - $this->assert_false( - preg_match('/\t/', file_get_contents($file)), - "{$file->getPathname()} has tabs in it"); + $file_as_string = file_get_contents($file); + if (preg_match('/\t/', $file_as_string)) { + foreach (split("\n", $file_as_string) as $l => $line) { + if (preg_match('/\t/', $line)) { + $errors[] = "$file:$l has tab(s) ($line)"; + } + } + } + $file_as_string = null; + } + if ($errors) { + $this->assert_false(true, "tab(s) found:\n" . join("\n", $errors)); } } |