]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Allow tests to be executed in the root library directory
authorJoshua Spence <josh@joshuaspence.com>
Thu, 2 Jan 2014 14:24:15 +0000 (01:24 +1100)
committerepriestley <git@epriestley.com>
Fri, 3 Jan 2014 20:55:10 +0000 (12:55 -0800)
See: <https://github.com/facebook/arcanist/pull/135>

Reviewed by: epriestley

src/unit/engine/PhutilUnitTestEngine.php

index 1a3a110cc7dc9ef03bab5502faa906a851b69a68..dbd3c9d35fb58b68c0e43f033e97471f39107f29 100644 (file)
@@ -81,7 +81,7 @@ final class PhutilUnitTestEngine extends ArcanistBaseUnitTestEngine {
 
     $run_tests = array();
     foreach ($symbols as $symbol) {
-      if (!preg_match('@/__tests__/@', $symbol['where'])) {
+      if (!preg_match('@(?:^|/)__tests__/@', $symbol['where'])) {
         continue;
       }