tidy-html5/test
2015-09-18 19:35:47 +02:00
..
accessTest new 2011-11-17 11:44:16 +09:00
html5 Update testhtml5 to use 'tidy' and not 'tidy5' 2015-09-14 14:30:09 -04:00
input Eventually complete a 2007 fix 2015-09-16 13:17:50 +02:00
testbase #65 - Add test 1642186-1 to 'testbase', and add to testcases.txt 2015-09-16 15:08:20 +02:00
.gitignore ignore all *.bak files 2014-08-08 18:00:08 +02:00
accesscases.txt Issue #168 alter 2 cases, 5-5-1-3 and 5-6-1-3 to expect what is output now. 2015-03-05 13:36:59 +01:00
acctest.cmd Fix EXE path in acctest.cmd, and change output dir 2015-09-10 13:58:50 +02:00
alltest.cmd Some cleanup of the alltest.cmd 2015-09-10 13:37:08 +02:00
alltest1.cmd Some cleanup of the alltest1.cmd 2015-09-10 13:37:19 +02:00
alltest2.bat fix goto target type 2015-05-14 14:52:05 +02:00
alltestc.bat Fix EXE path in alltestc.bat 2015-09-10 14:13:33 +02:00
cmp.sh Beef up the cmp.sh script output 2015-09-17 13:42:43 +02:00
onetest.cmd Some cleanup of the onetest.cmd 2015-09-10 13:37:39 +02:00
onetest2.bat Likewise, add info is onetest2.bat is run 2015-05-14 14:47:02 +02:00
onetesta.cmd and also use @ to suppress command output 2015-05-13 12:40:46 +02:00
README.md add the new testinfo.txt file decription 2015-05-14 15:03:36 +02:00
report-5.1.8.txt Add 3 diffs seemingly missed 2015-09-09 19:54:44 +02:00
t1.bat Convenient t1.bat to just do 1 input test case 2015-09-18 17:10:53 +02:00
t1.sh add t1.sh to do a single input test 2015-09-18 19:35:47 +02:00
testaccess.sh Changed text to point to html-tidy.org 2015-02-13 19:19:51 +08:00
testaccessone.sh Update testaccessone.sh to reference tidy, not tidy5 2015-09-14 14:27:26 -04:00
testall.sh Changed text to point to html-tidy.org 2015-02-13 19:19:51 +08:00
testcases.txt #65 - Add test 1642186-1 to 'testbase', and add to testcases.txt 2015-09-16 15:08:20 +02:00
testinfo.txt add a brief description of each test 2015-05-14 15:02:46 +02:00
testone.sh testone.sh - rename 'tidy5' to 'tidy' 2015-09-09 13:57:14 +02:00
testxml.sh Changed text to point to html-tidy.org 2015-02-13 19:19:51 +08:00
xmlcases.txt new 2011-11-17 11:44:16 +09:00
xmltest.cmd fix up the xmltest.cmd 2015-05-13 13:22:11 +02:00

test directory 20150513

It seems very little has been written about what is in this directory!

All of the test input files, some with their own config file, are in the 'input directory. These tests can be run using the various cmd/bat and sh script files supplied.

Files: alltest.cmd / testall.sh

In essence it was/is an attempt to automate some regression testing. The idea is/was that before making a code change to tidy, the alltest.cmd would be run using the current executable. This would produce a 'base' set of outputs in the temp-5 folder.

This folder should then be renamed say 'testbase'. Now you can make the desired code changes, and build a new executable, and run the alltest.cmd again, getting a 'new' output into the temp-5 folder.

Comparing the 'testbase' folder with the new 'temp-5' folder will show you what file output was changed by your code modification.

Difficult, and tedious! Yes, but is a sure way to see if your changes adversely effected tidy. Unfortunately, only such a visual comparison would show the results. If the output changes are fully acceptable, then this would become the new base.

Of course some of the tests were to say avoid a segfault found. Other tests were to visually compare the original input test file in a browser, with how the new output displayed in a browser. This is a purely VISUAL compare, and can not be done in code.

And what about if there was NO current test existing to test what you were trying to fix. Well that means a NEW test should be added. Its output added to the 'base', then there would be a comparison.

The chain is alltest.cmd runs alltest1.cmd, which then uses onetest.cmd for each test. And a similar chain for unix stating with testall.sh which uses testone.sh.

Both tool chains use the testcases.txt file for the list of some 227 cases. There is now a testinfo.txt file which give some desciption of the test. Well actually the title of the original bug report filed at https://sourceforge.net/p/tidy/bugs/#number/

Additionally there are some 27 xml tests, runby xmltest.cmd, reading the test list from xmlcases.txt, and using the same onetest.cmd for each test...

Files: acctest.cmd / testaccess.sh

Another series of tests in this folder are the accessability tests, executed by running the acctest.cmd.

It uses onetesta.cmd to process each of the some 118 tests in accesscases.txt.

The test files for these accessability tests are in the accessTest directory.

There is a similar unix tool chain of testaccess.sh, which uses testaccessone.sh for each test, from the same accesscases.txt list.

Files: alltestc.bat

This is essentially similar to the above, except it includes a COMPARE of the previous established output in the testbase folder with the NEW output in temp-5, hence the addition of a 'c'.

As indicated above, this is an attempt to create such a BASE set of output files when tidy is run on the input test cases.

Then when alltestc.bat is run, it runs alltest2.bat, whihc like the above it reads the tests from testcases.txt, and uses onetest2.bat for each test.

So the difference between this and the above is, it further immediately compares the output of tidy, if there is one, with the equivalent file in the testbase directory using a windows port of diff.

It is a success if there is NO diff! A difference means this newer version of tidy has modified the output. That modification needs to be carefully inspected, and if it is though exact and suitable, then that new output should be copied to the testbase folder for future compares.

Directory html5:

A series of some 31 test html5 files were added for HTML5 support to this directory.

In this folder there is a testhtml5.cmd, which uses testone.cmd to run each test. Similarly a testhtml5.sh for unix.

Each of the *.org.html files will be process, with the output witten to a tempout directory.

This was just to ensure tidy5 had support for many new tags introduced in HTML5.

; eof