Re: Running TEST suite
"Geoff Air" <[email protected]> Sun, 01 Jan 2006 00:37:48 +1100
| Newsgroups | gmane.comp.web.html-tidy.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Charlie, and Arnaud, Thank you for your reply, both directly to my email address, and on the develop board. I do get the 'develop' board sent to me in digest mode, which means I may be a day or so 'late' in getting it, but also thank you for the duplicate direct to my email account ... Yes, I do understand the test suites are NOT a 'rigorous' affair ... as you point out, they can not show what difference there is, if any, in the 'view-in-a-browser', but they do offer a small test of the 'compatibility' of 'versions' of tidy, at least in the ERRORLEVEL exit values for testcases.txt, and xmlcases.txt ... I shall deal separately with the accesscases.txt tests ... And all I can offer is a comparison of the downloaded WIN32 binary, HTML Tidy for Windows released on 1 September 2005 versus the version compiled locally using MSVC 7.1 from the CVS source, HTML Tidy for Windows released on 11 November 2005 and trying to 'understand' this difference ... and decide if it is good/bad/ok, and perhaps alter the 'test-cases' accordingly ... 1. Running alltest.cmd|testall.sh = testcases.txt list (a) Testing 473490 The source of this test, .\input\in_473490.html has a title line - <TITLE>[ #473490 ] DOCTYPE for Proprietary HTML to XHTML bad</TITLE> In the body, uses <nolayer> <p>Test</p> </nolayer> BOTH the downloaded binary, AND my CVS version show a WARNING on the <nolayer> tag ... like - line 7 column 1 - Warning: <nolayer> is not approved by W3C Why NOT alter line 86 in testcases.txt to 1 - that is - 86c86 < 473490 0 --- >473490 1 Of course I note that the -config file for this test, cfg_473490.txt has 'show-warnings: no', but my understanding of this is to NOT output the warning text ... the variable doc->warnings++; is still incremented, thus Tidy will still exit with ERRORLEVEL 1, denoting 1 or more warnings ... I can perhaps understand why this test is REPEATED in xmlcases.txt, since it is a HTML to XHTML case, but again why not also put a 1 in xmlcases.txt, line 8? Like - 8c8 < 473490 0 --- >473490 1 (b) Testing 1027888 Here there is a difference between the downloaded binary, and my compiled binary. The downloaded binary emits a warning - line 5 column 1 - Warning: </body> isn't allowed in <body> elements Info: Doctype given is "-//W3C//DTD HTML 4.01//EN" Info: Document content looks like HTML 4.01 Strict 1 warning, 0 errors were found! thus exits with 1, not the 0, as expected in testcases.txt??? This is a clear DIFFERENCE between the versions! BOTH versions add the 'implied' <body> element, as well as perform the <div ...> merging, the main point of the test (I think), but the recent CVS version no longer 'sees' a warning in finding </body> ... which is actually found about line 41 ... line 5 is about where it inserted the 'implied' <body> element ... So, in this case, it is a question of WHICH is right? I favour the older version, since Tidy does have to 'correct' something ... it added an implied <body> element ... but it is not cast in stone ... In both cases, the IE 'view' looks the SAME ... as stated, this is mainly a merge of some repeated <div ...> elements ... I have a VERY VERBAL version, and it shows the current CVS 'silently' inserts the missing <body> element, with part of my additional verbal output showing - -------->FreeNode [head] EndTag [</head>] ParseHTML ... next node [div] StartTag [^M^J^M^J<div>] ==> InsertNodeAtEnd ... element [html] StartTag node [body] StartTag next [null] ParseBody ... body [body] StartTag [null] ParseBody ... next node [div] StartTag [^M^J^M^J<div>] ==> InsertNodeAtEnd ... element [body] StartTag node [div] StartTag content [^M^J^M^J<div>] So, we can see Tidy found the EndTag for 'head', dropped back to ParseHTML, as it should ... then it found the <div> StartTag, but immediately, and SILENTLY generated a <body> StartTag, then dealt with the <div> in ParseBody() ... As stated, I am not sure I AGREE with such SILENT corrections ... I think it should emit a 'warning' at least ... but then again, in this particular test, it MERGES multiple 'div' tags also SILENTLY ... I note the 'duplicates' are REMOVED after the document is loaded, again with an extract of my verbal output - -------->FreeNode [html] EndTag [^M^J</html>] -------->FreeNode [div] StartTag [<div id="id1">^M^J] -------->FreeNode [div] StartTag [<div title="div2">^M^J] -------->FreeNode [div] StartTag [<div title="div2" class="cl2">^M^J] ... etc ... The above shows Tidy SILENTLY freeing some of the duplicated 'div' tags AFTER it has parsed the end of the document </html>, but BEFORE is does the 'print', and no 'warning' is generated ... (c) Testing 1359292 - a word-2000 test ... I can not understand why the downloaded version 'locks' on this test ... my CVS compiled version sails through this test ... it is the last test in the file ... the downloaded binary has NO PROBLEM if used without the -config file - tidy .\input\in_1359292.html So it is something in the config that causes this 'jam'? ... the config is quite a big one ... maybe I can try removing the items one-by-one ... ok, that was lucky - commenting out the last config parameter, and the downloaded Tidy ran fine??? # drop-empty-paras: no But since this is a downloaded binary, I can not get into it further ... with this one parameter removed, it exited with 1 (for the 4 warnings found), so it too passes this 'test' ... 2. Running xmltest.cmd|testxml.sh = xmlcases.txt list (a) Testing 473490 As mentioned above, this test is a REPEAT, and as suggested above, perhaps xmlcases.txt needs to be changed, like - 8c8 < 473490 0 --- >473490 1 (b) Testing 586555 BOTH, the downloaded binary, and my compiled EXE emit one (1) warning, thus exit with errorlevel 1, while presently the test 'expects' 0 ... As previously stated, changing the config file - input\cfg_586555.txt as follows - 5,6c5,6 < show-warnings: no < quiet: yes --- >show-warnings: yes >quiet: no and we can 'see' the warning ... line 11 column 1 - Warning: <area> lacks "alt" attribute Info: Doctype given is "-//W3C//DTD XHTML 1.0 Strict//EN" Info: Document content looks like XHTML 1.0 Strict 1 warning, 0 errors were found! Again I suggest xmlcases.txt be changed as follows - 16c16 < 586555 0 --- >586555 1 If other WIN32 people want to try my compiled binary, I have started a 'Tidy' page on my web - http://geoffmclane.com/tidy - where I have put my tidycvs.exe in a zip file ... this is NOT intended as a 'release' version ... As mentioned, I will try to deal with the 'access' cases separately, later, if I get a chance ... I have not looked into this aspect very much yet ... And, yes, I will come back to how Tidy handles (a) overlapping elements, like - <b>Bold Only <i>Bold and Italic</b> Only Italic</i>, (b) fixing missing <table> element, (c) joining <form> elements, and the like, from the examples in bug tracker ... Hope this clarifies, and helps just fixing the alltest.cmd|testall.sh/testcases.txt, and xmltest.cmd|testxml.sh/xmlcases.txt pairs ... I do not think these are platform dependant issues, but maybe Arnaud can confirm that ... I am progressing towards installing a distribution of linux in one of my machines, but it is a SLOW process ;=() I certainly do intend to 'take it easy' ;=)) one of the most important maxims in life ... Regards, Geoff. PS: The WIN32 port of the GNU diff tool I use is version - diff - GNU diffutils version 2.7 from http://unxutils.sourceforge.net/ _________________________________________________________________ ASUS M5 Ultra-slim lightweight is Now $1999 (was $2,999) http://a.ninemsn.com.au/b.aspx?URL=http%3A%2F%2Fwww%2Easus%2Ecom%2Eau%2F&_t=752129232&_r=Hotmail_tagline_23Nov05&_m=EXT ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click