Skip to content

Commit 6319a35

Browse files
orlitzkyweltling
authored andcommitted
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.
1 parent a467a42 commit 6319a35

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

ext/tidy/tests/024.phpt

+6-7
Original file line numberDiff line numberDiff line change
@@ -13,28 +13,27 @@ if (strtotime(tidy_get_release()) < strtotime('20 january 2007')) die ('skip old
1313
$contents = '
1414
<wps:block>
1515
<wps:var>
16-
<wps:value/>
16+
<wps:value></wps:value>
1717
</wps:var>
1818
</wps:block>';
1919

2020
$config = array(
21+
'doctype' => 'omit',
2122
'new-blocklevel-tags' => 'wps:block,wps:var,wps:value',
2223
'newline' => 'LF'
2324
);
2425

2526
$tidy = tidy_parse_string($contents, $config, 'utf8');
2627
$tidy->cleanRepair();
27-
28-
var_dump($tidy->value);
28+
echo $tidy;
2929

3030
?>
3131
--EXPECTF--
32-
string(11%d) "<html>
32+
<html>
3333
<head>
3434
<title></title>
3535
</head>
3636
<body>
37-
<wps:block>%w<wps:var>
38-
<wps:value></wps:var>%w</wps:block>
37+
<wps:block>%w<wps:var>%w<wps:value></wps:value>%w</wps:var>%w</wps:block>
3938
</body>
40-
</html>"
39+
</html>

0 commit comments

Comments
 (0)