Jonas Fonseca
3f93148c9b
Refactor test-sgml-parser-basic to work with non-bash shells
...
A problem with \n replacement caused test no. 19 to fail.
Fix it by also allowing expected output to be prepared in a
file by introducing a new backend: test_output_equals_file,
also used test_output_equals.
Tested on Ubuntu Feisty Fawn with both /bin/bash and /bin/sh
where /bin/sh failed before the fix. Reported by Witek.
2007-05-05 11:39:23 +02:00
Jonas Fonseca
640d73b7db
Cast indentation counter to int to fix compilation on Mac OS X
...
The error was:
sgml-parser.c: In function 'print_indent':
sgml-parser.c:99: warning: field precision should have type 'int', but argument 2 has type 'long unsigned int'
2006-12-03 20:45:01 +01:00
Laurent MONIN
5acb5e6663
Trim trailing whitespaces.
2006-05-31 19:34:49 +02:00
Jonas Fonseca
6cd5e387e5
DOM: Change sgml-parser program to have sane exit code for incomplete input
2006-02-01 10:51:24 +01:00
Jonas Fonseca
c7843058fc
DOM: Convert to use enum dom_code
...
Doh, ended pushing out half finished commits. :(
2006-02-01 10:38:21 +01:00
Jonas Fonseca
4de26051b9
Ignore test files
2006-01-31 22:23:22 +01:00
Jonas Fonseca
73c06aaa10
DOM: Add test for parsing randomized HTML
...
It uses mangleme by Michal Zalewski <lcamtuf@coredump.cx> to generate HTML
which is then fed into the sgml-parser program. By default 100 random HTML
documents are tested. But the test script takes the number of documents
to test against as an argument. Useful for torture testing the SGML parser.
2006-01-31 19:29:48 +01:00
Jonas Fonseca
f42dd94fb5
DOM: Fix test descriptions
2006-01-30 06:45:53 +01:00
Jonas Fonseca
7be0093e36
DOM: Add test for dumping DOM trees to SGML
2006-01-30 06:25:22 +01:00
Jonas Fonseca
2918e3f595
DOM: Add STATIC_DOM_STRING macro and make INIT_DOM_STRING cleaner
2006-01-28 22:55:15 +01:00
Jonas Fonseca
58b8635caf
DOM: Add test to check that '\f' (form feed) counts as a newline
2006-01-28 22:51:52 +01:00
Jonas Fonseca
c223f6ce94
Sed the expected output instead of the output from sgml-parser
2006-01-28 15:12:49 +01:00
Jonas Fonseca
03c467bcbf
Move URI normalization to the test library
2006-01-28 15:03:19 +01:00
Jonas Fonseca
d92a074e40
Fix parsing of '<a< b>' where the scanner didn't rewind to the proper place
...
Add test for this tag soup combo.
2006-01-28 03:21:27 +01:00
Jonas Fonseca
a2376609e3
Expand the testing of incremental parsing
...
There are still some bugs to resolve.
2006-01-28 00:50:06 +01:00
Jonas Fonseca
0f8aa77ebb
Add test for incremental SGML parsing
...
It is a loop that parses the same small document with various read sizes.
The sgml-parser program is updated to take --stdin option taking a the read
size as a required parameter.
2006-01-27 07:49:15 +01:00
Jonas Fonseca
afb45aace5
Add support for scanning comment endings such as '--!>' correctly
2006-01-25 18:18:01 +01:00
Jonas Fonseca
2eba71d95b
Add support for testing normalization using the DOM configuration module
2006-01-20 02:08:46 +01:00
Jonas Fonseca
34b12d21bd
Upgrade to use dom_stack_codes in the callbacks
2006-01-17 16:58:19 +01:00
Jonas Fonseca
2748d043f9
Autogenerate .vimrc files and put the master in config/vimrc
...
This changes the init target to be idempotent: most importantly it will now
never overwrite a Makefile if it exists. Additionally 'make init' will
generate the .vimrc files. Yay, no more stupid 'added fairies' commits! ;)
2006-01-15 18:38:58 +01:00
Jonas Fonseca
082031c10c
Fix SGML parser test program
2006-01-14 12:44:06 +01:00
Laurent MONIN
bdc59d5ac4
Store lib.o name in a variable named LIB_O_NAME.
2006-01-12 19:06:50 +01:00
Jonas Fonseca
534a16fff1
Improve error detection
2006-01-07 23:40:21 +01:00
Jonas Fonseca
97f403a9d9
Add a test file for checking detection of errors by the SGML parser
2006-01-07 05:15:16 +01:00
Jonas Fonseca
03ee543e21
Make sgml-parser request error detection when passed --error option
2006-01-07 04:27:08 +01:00
Jonas Fonseca
a1e5122183
Drop unnneeded URL argument and simplify test helpers
2006-01-07 02:14:45 +01:00
Jonas Fonseca
f1c3c90a4f
Move line counting tests to own file; simplifies a few things
2006-01-07 02:02:21 +01:00
Jonas Fonseca
dee8ac5b45
Move test for incompleteness to own file
2006-01-07 01:48:51 +01:00
Jonas Fonseca
c9c41e38a2
test_expect_incomplete(): Put sgml-parser output to /dev/null
2006-01-07 01:27:48 +01:00
Jonas Fonseca
bca330fcbd
Simplify incomplete test helper and fix quoting problem
2006-01-07 01:22:14 +01:00
Jonas Fonseca
215d7ec158
Append memdebug to test dependencies in Makefile.lib
2006-01-06 22:11:45 +01:00
Jonas Fonseca
5f5c78a87f
Realign the test docs with reality
2006-01-06 18:32:22 +01:00
Jonas Fonseca
ab8a4b2847
Add more tests based on test/comments.html
2006-01-05 15:36:18 +01:00
Jonas Fonseca
7a5f699a88
Drop unneeded -b arg to cmp, which isn't available in FreeBSD's version
2006-01-03 20:00:06 +01:00
Jonas Fonseca
146ca09c43
Improve support for running 'make test' when srcdir != builddir
...
Additionally, also make TESTDEPS conditionally contain memdebug object
binary only if CONFIG_DEBUG is yes.
2006-01-03 19:04:17 +01:00
Jonas Fonseca
ba5bdfec00
Move the 'make test' handling to Makefile.lib
...
The test rule is defined when TEST_PROGS is defined. Users should also set
TESTDEPS to get the correct object files linked in.
2006-01-03 00:45:22 +01:00
Jonas Fonseca
23f0085842
Move src/dom/test/libtest test/libtest.sh, put path to it in TEST_LIB
2006-01-03 00:34:10 +01:00
Jonas Fonseca
f88cbe6761
Add check of incomplete text
2006-01-02 22:35:03 +01:00
Jonas Fonseca
42156f4477
Change one test description to start with 'Parse ...'
2006-01-02 22:31:28 +01:00
Jonas Fonseca
0160c0a464
Make it possible to test how incomplete input is parsed
...
Also fix the expected output of proc. instruction test.
2006-01-02 21:02:41 +01:00
Jonas Fonseca
af72dd8435
Make parse_sgml() return the sgml_parser_code enum
...
It is mostly just ignored for now. The SGML parser test tool will however
return parser code.
2006-01-02 17:40:42 +01:00
Jonas Fonseca
8c9324cc37
Add test for SGML such as, e.g. '<parent<child/></parent>'
2006-01-02 16:26:01 +01:00
Jonas Fonseca
0071ea696c
Fix logic in update_number_of_lines() and tell parse_sgml() src is complete
2006-01-02 14:59:54 +01:00
Jonas Fonseca
7717862401
Make it possible to pass --print-lines to test line counting
2006-01-02 01:48:08 +01:00
Jonas Fonseca
275ba0b789
Use common print_indent() to simplify printf()-strings
2006-01-02 00:32:22 +01:00
Jonas Fonseca
4a766f350b
Just for fun also parse <?xml-stylesheet attributes
2005-12-31 03:13:39 +01:00
Jonas Fonseca
7489c134f7
Make non-terminated comments and cdata sections have 'the rest' as content
2005-12-31 01:47:57 +01:00
Jonas Fonseca
14a3f9c0fd
Disable dom-select building since it requires defining of DOM_STACK_TRACE
2005-12-31 00:05:49 +01:00
Jonas Fonseca
ad052c3985
Hey, hey Cripple Creek Fai^H^Herry
2005-12-30 21:19:46 +01:00
Jonas Fonseca
41f1f5f9d3
Add a simple program for testing the DOM select code
...
It accepts --uri, --src and --selector args.
2005-12-30 03:33:48 +01:00