From da5b2a2be25c23e448cb1842ebcdf856b43fed13 Mon Sep 17 00:00:00 2001 From: mwilliams Date: Fri, 19 Jul 2013 07:19:25 -0700 Subject: [PATCH] Fix convenience test name matching It used to lookup the longest initial sequence that contained no slashes, so that eg: cd hphp/test ./run quick/SetM.php Would run all the quick tests --- hphp/test/run | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hphp/test/run b/hphp/test/run index 56afacbb0..4f2035aa6 100755 --- a/hphp/test/run +++ b/hphp/test/run @@ -168,12 +168,10 @@ function map_convenience_filename($file) { 'facebook' => 'hphp/facebook/test', ); - $m = null; - if (!preg_match('/([^\/]*)/', $file, $m) || - !isset($mappage[$m[1]])) { + if (!isset($mappage[$file])) { return $file; } - return hphp_home().'/'.$mappage[$m[1]]; + return hphp_home().'/'.$mappage[$file]; } function find_tests($files) {