[phc-internals] [phc commit] r1135 - trunk/test/framework
codesite-noreply at google.com
codesite-noreply at google.com
Wed Apr 2 22:24:35 IST 2008
Author: paul.biggar
Date: Wed Apr 2 14:23:42 2008
New Revision: 1135
Modified:
trunk/test/framework/basic_parse_test.php
Log:
Basic_parse_test gave a false positive when there was no output, but
there should have been. Fixed.
Modified: trunk/test/framework/basic_parse_test.php
==============================================================================
--- trunk/test/framework/basic_parse_test.php (original)
+++ trunk/test/framework/basic_parse_test.php Wed Apr 2 14:23:42 2008
@@ -64,8 +64,8 @@
{
$err = $bundle->errs[0];
$err = preg_replace ("/Note that line numbers are inaccurate, and
will be fixed in a later release\n/", "", $err);
- $err = preg_replace ("!{$expected["err_regex"]}!ms", "", $err);
- if ($err !== "")
+ $replaced = preg_replace ("!{$expected["err_regex"]}!ms", "", $err);
+ if ($replaced !== "" || ($err == "" && $expected["err_regex"] != ""))
{
$this->mark_failure ("Error doesnt match, expected: \"".
$expected["err_regex"] . "\"", $bundle);
return;
@@ -76,8 +76,8 @@
if (isset ($expected["out_regex"]))
{
$out = $bundle->outs[0];
- $out = preg_replace ("!{$expected["out_regex"]}!ms", "", $out);
- if ($out !== "")
+ $replaced = preg_replace ("!{$expected["out_regex"]}!ms", "", $out);
+ if ($replaced !== "" || ($out == "" && $expected["out_regex"] != ""))
{
$this->mark_failure ("Output doesnt match", $bundle);
return;
More information about the phc-internals
mailing list