Added tests for html tools.
This commit is contained in:
parent
fb93897ac7
commit
60a99ee705
5 changed files with 39 additions and 0 deletions
4
golden-files/input/hi.html
Normal file
4
golden-files/input/hi.html
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<html>
|
||||||
|
<head></head>
|
||||||
|
<body>hello</body>
|
||||||
|
</html>
|
||||||
1
golden-files/results/html2text-hi_html
Normal file
1
golden-files/results/html2text-hi_html
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
hello
|
||||||
11
golden-files/results/html_syntax-hi_html
Normal file
11
golden-files/results/html_syntax-hi_html
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
line 1 column 1 - Warning: missing <!DOCTYPE> declaration
|
||||||
|
line 2 column 3 - Warning: inserting missing 'title' element
|
||||||
|
Info: Document content looks like HTML 3.2
|
||||||
|
2 warnings, 0 errors were found!
|
||||||
|
|
||||||
|
|
||||||
|
To learn more about HTML Tidy see http://tidy.sourceforge.net
|
||||||
|
Please fill bug reports and queries using the "tracker" on the Tidy web site.
|
||||||
|
Additionally, questions can be sent to html-tidy@w3.org
|
||||||
|
HTML and CSS specifications are available from http://www.w3.org/
|
||||||
|
Lobby your company to join W3C, see http://www.w3.org/Consortium
|
||||||
11
golden-files/results/tidy-hi_html
Normal file
11
golden-files/results/tidy-hi_html
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta name="generator" content=
|
||||||
|
"HTML Tidy for Linux/x86 (vers 25 March 2009), see www.w3.org">
|
||||||
|
<title></title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
hello
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
@ -129,6 +129,18 @@ class ToolsTestCase(unittest.TestCase):
|
||||||
self._sub_tests([(tools.splint, "hello.c", tools.Status.ok),
|
self._sub_tests([(tools.splint, "hello.c", tools.Status.ok),
|
||||||
(tools.splint, "hello.h", tools.Status.ok)])
|
(tools.splint, "hello.h", tools.Status.ok)])
|
||||||
|
|
||||||
|
def test_html_syntax(self):
|
||||||
|
self._sub_tests([
|
||||||
|
(tools.html_syntax, "hi.html", tools.Status.problem)])
|
||||||
|
|
||||||
|
def test_tidy(self):
|
||||||
|
self._sub_tests([
|
||||||
|
(tools.tidy, "hi.html", tools.Status.normal)])
|
||||||
|
|
||||||
|
def test_html2text(self):
|
||||||
|
self._sub_tests([
|
||||||
|
(tools.html2text, "hi.html", tools.Status.normal)])
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
golden.main()
|
golden.main()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue