change exactly message
This fixes 005.php. Shoudld we change our error message instead? We aren't even consistent with the error message for 001.php for func_get_args().
Esse commit está contido em:
@@ -1,4 +1,4 @@
|
||||
HipHop Warning: strncmp() expects exactly 3 parameters, 2 given in hphp/test/zend/bad/004.php on line %d
|
||||
HipHop Warning: Missing argument 3 for strncmp() in hphp/test/zend/bad/004.php on line %d
|
||||
NULL
|
||||
int(0)
|
||||
HipHop Warning: Length must be greater than or equal to 0 in hphp/test/zend/bad/004.php on line %d
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
HipHop Warning: strcasecmp() expects exactly 2 parameters, 1 given in hphp/test/zend/bad/005.php on line %d
|
||||
NULL
|
||||
int(0)
|
||||
int(-3)
|
||||
int(-1)
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
Done
|
||||
@@ -1,4 +1,4 @@
|
||||
HipHop Warning: strncasecmp() expects exactly 3 parameters, 1 given in hphp/test/zend/bad/006.php on line %d
|
||||
HipHop Warning: Missing argument 3 for strncasecmp() in hphp/test/zend/bad/006.php on line %d
|
||||
NULL
|
||||
HipHop Warning: Length must be greater than or equal to 0 in hphp/test/zend/bad/006.php on line %d
|
||||
bool(false)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
HipHop Warning: property_exists() expects exactly 2 parameters, 0 given in hphp/test/zend/bad/011.php on line %d
|
||||
HipHop Warning: Missing argument 2 for property_exists() in hphp/test/zend/bad/011.php on line %d
|
||||
NULL
|
||||
HipHop Warning: property_exists() expects exactly 2 parameters, 1 given in hphp/test/zend/bad/011.php on line %d
|
||||
HipHop Warning: Missing argument 2 for property_exists() in hphp/test/zend/bad/011.php on line %d
|
||||
NULL
|
||||
bool(true)
|
||||
bool(true)
|
||||
|
||||
@@ -8,7 +8,7 @@ array(2) {
|
||||
[1]=>
|
||||
string(%d) "%s"
|
||||
}
|
||||
HipHop Warning: get_included_files() expects exactly 0 parameters, 2 given in hphp/test/zend/bad/014.php on line %d
|
||||
HipHop Warning: Missing argument 0 for get_included_files() in hphp/test/zend/bad/014.php on line %d
|
||||
NULL
|
||||
array(2) {
|
||||
[0]=>
|
||||
@@ -16,7 +16,7 @@ array(2) {
|
||||
[1]=>
|
||||
string(%d) "%s"
|
||||
}
|
||||
HipHop Warning: get_included_files() expects exactly 0 parameters, 1 given in hphp/test/zend/bad/014.php on line %d
|
||||
HipHop Warning: Missing argument 0 for get_included_files() in hphp/test/zend/bad/014.php on line %d
|
||||
NULL
|
||||
array(2) {
|
||||
[0]=>
|
||||
|
||||
@@ -15,11 +15,11 @@ NULL
|
||||
string(5) "array"
|
||||
string(5) "array"
|
||||
int(%d)
|
||||
HipHop Warning: get_defined_functions() expects exactly 0 parameters, 1 given in hphp/test/zend/bad/017.php on line %d
|
||||
HipHop Warning: Missing argument 0 for get_defined_functions() in hphp/test/zend/bad/017.php on line %d
|
||||
NULL
|
||||
string(5) "array"
|
||||
int(%d)
|
||||
HipHop Warning: get_declared_interfaces() expects exactly 0 parameters, 1 given in hphp/test/zend/bad/017.php on line %d
|
||||
HipHop Warning: Missing argument 0 for get_declared_interfaces() in hphp/test/zend/bad/017.php on line %d
|
||||
NULL
|
||||
string(5) "array"
|
||||
int(%d)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
*** Testing get_defined_functions() : error conditions ***
|
||||
|
||||
-- Testing get_defined_functions() function with more than expected no. of arguments --
|
||||
HipHop Warning: get_defined_functions() expects exactly 0 parameters, 1 given in hphp/test/zend/bad/get_defined_functions_error.php on line %d
|
||||
HipHop Warning: Missing argument 0 for get_defined_functions() in hphp/test/zend/bad/get_defined_functions_error.php on line %d
|
||||
NULL
|
||||
|
||||
===Done===
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
HipHop Warning: Missing argument 2 for strcasecmp() in hphp/test/zend/good/005.php on line 3
|
||||
NULL
|
||||
int(0)
|
||||
int(-3)
|
||||
int(-1)
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
int(0)
|
||||
Done
|
||||
@@ -21,6 +21,10 @@ bad_tests = (
|
||||
'unset_cv06.php',
|
||||
)
|
||||
|
||||
errors = (
|
||||
('([^\s]+)\(\) expects exactly (\d+) parameters, \d+ given', r'Missing argument \2 for \1()'),
|
||||
)
|
||||
|
||||
def split(pattern, str):
|
||||
return re.split(r'\n\s*--'+pattern+'--\s*\n', str, 1)
|
||||
|
||||
@@ -66,6 +70,9 @@ def walk(filename):
|
||||
exp = exp.replace('Warning:', 'HipHop Warning:')
|
||||
exp = exp.replace('Notice:', 'HipHop Notice:')
|
||||
|
||||
for error in errors:
|
||||
exp = re.sub(error[0], error[1], exp)
|
||||
|
||||
file(full_dest_filename, 'w').write(test)
|
||||
file(full_dest_filename+'.exp', 'w').write(exp)
|
||||
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário