File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
tidy /
tests /
tidy_error.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:48:05 2012 UTC (12 years, 6 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Ensure tidy_get_status() returns correct status
--CREDITS--
Stefan Priebsch
--SKIPIF--
<?php
if (!extension_loaded("tidy")) print "skip tidy extension not loaded";
?>
--FILE--
<?php
$html = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title></title>
</head>
<body>
<p>paragraph</p>
</body>
</html>';
$tidy = tidy_parse_string($html);
echo tidy_get_status($tidy);
// status 0 indicates no errors or warnings
$html = '<p>paragraph</i>';
$tidy = tidy_parse_string($html);
echo tidy_get_status($tidy);
// status 1 indicates warnings
$html = '<bogus>test</bogus>';
$tidy = tidy_parse_string($html);
echo tidy_get_status($tidy);
// status 2 indicates error
?>
--EXPECT--
012
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>