Stop unit tests from doing eval() in repo mode

Most of these tests were only about eval, so they get norepo.
For FPassC, I pulled the eval case into its own test.  This is
separate from the diff to actual make eval fatal in RepoAuthoritative
in case we end up needing to revert that one ...

Reviewed By: @scannell

Differential Revision: D1116200
Esse commit está contido em:
Jordan DeLong
2014-01-03 14:29:05 -08:00
commit de Sara Golemon
commit 5db636ae70
40 arquivos alterados com 48 adições e 6 exclusões
+3 -3
Ver Arquivo
@@ -24,9 +24,9 @@ echo "==============================\n";
// doesn't fatal, raises strict standards warning
$x = null;
g(eval('return $x;'));
var_dump($x);
$x = null;
g($x = 'abc');
-3
Ver Arquivo
@@ -8,9 +8,6 @@ object(stdClass)#2 (0) {
object(stdClass)#1 (0) {
}
==============================
HipHop Strict Warning: Only variables should be passed by reference in %s on line 28
NULL
NULL
HipHop Strict Warning: Only variables should be passed by reference in %s on line 32
string(3) "abc"
string(3) "abc"
+16
Ver Arquivo
@@ -0,0 +1,16 @@
<?php
error_reporting(-1);
if (1) {
function g(&$x) {
var_dump($x);
$x = 123;
}
}
// doesn't fatal, raises strict standards warning
$x = null;
g(eval('return $x;'));
var_dump($x);
+3
Ver Arquivo
@@ -0,0 +1,3 @@
HipHop Strict Warning: Only variables should be passed by reference in %s on line 15
NULL
NULL
Ver Arquivo
Ver Arquivo
Ver Arquivo
Ver Arquivo
Ver Arquivo
Ver Arquivo
+26
Ver Arquivo
@@ -364,6 +364,32 @@ norepo_tests = (
'/tests/lang/include_variation3.php',
'/tests/lang/static_variation_001.php',
'/tests/lang/static_variation_002.php',
# These tests use eval(), which is banned in repo mode.
'/Zend/tests/bug31102.php',
'/Zend/tests/bug33116.php',
'/Zend/tests/bug36513.php',
'/Zend/tests/bug43128.php',
'/Zend/tests/bug54624.php',
'/Zend/tests/bug60444.php',
'/Zend/tests/bug62907.php',
'/Zend/tests/bug63305.php',
'/Zend/tests/bug65254.php',
'/Zend/tests/constants/dir-constant-eval.php',
'/Zend/tests/is_a.php',
'/Zend/tests/method_static_var.php',
'/ext/session/tests/bug53141.php',
'/ext/spl/tests/spl_autoload_014.php',
'/ext/spl/tests/spl_autoload_bug48541.php',
'/ext/standard/tests/class_object/is_a.php',
'/ext/standard/tests/general_functions/bug35229.php',
'/ext/standard/tests/serialize/bug62836_1.php',
'/tests/classes/constants_basic_006.php',
'/tests/lang/013.php',
'/tests/lang/014.php',
'/tests/lang/018.php',
'/tests/lang/bug21961.php',
'/tests/lang/foreachLoop.012.php',
)
# Random other files that zend wants