com php-src: ext/tidy: work around a legacy libtidy bug in a test.: ext/tidy/tests/024.phpt

From: Date: Mon, 11 Jul 2016 12:05:43 +0000
Subject: com php-src: ext/tidy: work around a legacy libtidy bug in a test.: ext/tidy/tests/024.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-92926@lists.php.net to get a copy of this message
Commit: 6319a358496dda48d2c9541aec59fa78a0a96492 Author: Michael Orlitzky <michael@orlitzky.com> Thu, 9 Jun 2016 23:39:07 -0400 Committer: Anatol Belski <ab@php.net> Mon, 11 Jul 2016 14:05:43 +0200 Parents: a467a42dd179263f334bcfaca76d320d57d7bd19 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6319a358496dda48d2c9541aec59fa78a0a96492 Log: ext/tidy: work around a legacy libtidy bug in a test. Our existing test 024.phpt actually tests incorrect behavior. There is a self-closing tag present in the input, but the expected output has that same tag half-open (i.e. open but never closed).. To support tidy-html5, which does the right thing, that test needed to be changed. The self-closing tag was replaced by an explicit pair of tags, and some extra whitespace fudging was done. Changed paths: M ext/tidy/tests/024.phpt Diff: diff --git a/ext/tidy/tests/024.phpt b/ext/tidy/tests/024.phpt index b09f5b4..6a258b3 100644 --- a/ext/tidy/tests/024.phpt +++ b/ext/tidy/tests/024.phpt @@ -13,28 +13,27 @@ if (strtotime(tidy_get_release()) < strtotime('20 january 2007')) die ('skip old $contents = ' <wps:block> <wps:var> -<wps:value/> +<wps:value></wps:value> </wps:var> </wps:block>'; $config = array( +'doctype' => 'omit', 'new-blocklevel-tags' => 'wps:block,wps:var,wps:value', 'newline' => 'LF' ); $tidy = tidy_parse_string($contents, $config, 'utf8'); $tidy->cleanRepair(); - -var_dump($tidy->value); +echo $tidy; ?> --EXPECTF-- -string(11%d) "<html> +<html> <head> <title></title> </head> <body> -<wps:block>%w<wps:var> -<wps:value></wps:var>%w</wps:block> +<wps:block>%w<wps:var>%w<wps:value></wps:value>%w</wps:var>%w</wps:block> </body> -</html>" +</html>

« previous php.cvs (#92926) next »