diff --git a/golden-files/input/hi.html b/golden-files/input/hi.html new file mode 100644 index 0000000..06aebe7 --- /dev/null +++ b/golden-files/input/hi.html @@ -0,0 +1,4 @@ + + + hello + diff --git a/golden-files/results/html2text-hi_html b/golden-files/results/html2text-hi_html new file mode 100644 index 0000000..ce01362 --- /dev/null +++ b/golden-files/results/html2text-hi_html @@ -0,0 +1 @@ +hello diff --git a/golden-files/results/html_syntax-hi_html b/golden-files/results/html_syntax-hi_html new file mode 100644 index 0000000..2e5f7a5 --- /dev/null +++ b/golden-files/results/html_syntax-hi_html @@ -0,0 +1,11 @@ +line 1 column 1 - Warning: missing 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 \ No newline at end of file diff --git a/golden-files/results/tidy-hi_html b/golden-files/results/tidy-hi_html new file mode 100644 index 0000000..a64bd39 --- /dev/null +++ b/golden-files/results/tidy-hi_html @@ -0,0 +1,11 @@ + + + + + + + +hello + + \ No newline at end of file diff --git a/tools_test.py b/tools_test.py index 8f7ffe6..43b7c9e 100755 --- a/tools_test.py +++ b/tools_test.py @@ -129,6 +129,18 @@ class ToolsTestCase(unittest.TestCase): self._sub_tests([(tools.splint, "hello.c", 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__": golden.main()