Skip to content

Commit

Permalink
HHVM removes invalid comments at the end of a file, as if they were n…
Browse files Browse the repository at this point in the history
…ever there
  • Loading branch information
gsherwood committed Sep 7, 2016
1 parent 67a31be commit 66f3f2e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,18 @@ public function getErrorList($testFile='')
{
switch ($testFile) {
case 'EndFileNewlineUnitTest.3.inc':
case 'EndFileNewlineUnitTest.4.inc':
case 'EndFileNewlineUnitTest.3.js':
case 'EndFileNewlineUnitTest.3.css':
return array(
2 => 1,
);
break;
return array(2 => 1);
case 'EndFileNewlineUnitTest.4.inc':
// HHVM just removes the entire comment token, as if it was never there.
if (defined('HHVM_VERSION') === true) {
return array();
}

return array(2 => 1);
default:
return array();
break;
}//end switch

}//end getErrorList()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,26 @@ public function getErrorList($testFile='')
case 'EndFileNoNewlineUnitTest.1.css':
case 'EndFileNoNewlineUnitTest.1.js':
case 'EndFileNoNewlineUnitTest.2.inc':
return array(
3 => 1,
);
break;
return array(3 => 1);
case 'EndFileNoNewlineUnitTest.2.css':
case 'EndFileNoNewlineUnitTest.2.js':
return array(2 => 1);
case 'EndFileNoNewlineUnitTest.5.inc':
// HHVM just removes the entire comment token, as if it was never there.
if (defined('HHVM_VERSION') === true) {
return array(1 => 1);
}

return array();
case 'EndFileNoNewlineUnitTest.6.inc':
return array(
2 => 1,
);
break;
// HHVM just removes the entire comment token, as if it was never there.
if (defined('HHVM_VERSION') === true) {
return array(1 => 1);
}

return array(2 => 1);
default:
return array();
break;
}//end switch

}//end getErrorList()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,17 @@ public function getErrorList($testFile='')
case 'EndFileNewlineUnitTest.3.inc':
case 'EndFileNewlineUnitTest.6.inc':
case 'EndFileNewlineUnitTest.7.inc':
return array(2 => 1);
case 'EndFileNewlineUnitTest.9.inc':
case 'EndFileNewlineUnitTest.10.inc':
return array(
2 => 1,
);
break;
// HHVM just removes the entire comment token, as if it was never there.
if (defined('HHVM_VERSION') === true) {
return array();
}

return array(2 => 1);
default:
return array();
break;
}//end switch

}//end getErrorList()
Expand Down

0 comments on commit 66f3f2e

Please sign in to comment.