Commit Graph

63 Commits

Author SHA1 Message Date
Fred L. Drake, Jr.
2ff7f92016 - be more specific about the errors we expect to see reported
- change the name of make_basic_suite() to make_suite(), since there's
  only one make_*_suite() function
2003-03-12 19:25:03 +00:00
Fred L. Drake, Jr.
72ba3bd3d8 Add regression tests for SF bugs:
#692964 - Case where expat 1.95.6 doesn't report duplicate attributes
#695401 - Unbound prefixes not rejected
2003-03-12 19:17:18 +00:00
Fred L. Drake, Jr.
db8a501c0d - two more tests based on Karl's comments on SF patch #673791
- pass XML_TRUE or XML_FALSE as the isFinal parameter for XML_Parse()
2003-01-28 05:33:37 +00:00
Fred L. Drake, Jr.
f85926afd5 Added regression tests for SF bug #673791. 2003-01-25 06:55:25 +00:00
Fred L. Drake, Jr.
7fd8181a4a Thread the proper file name and line number to make determination of
which test is failing easier.
2003-01-25 04:57:44 +00:00
Fred L. Drake, Jr.
5d55922080 - _expect_failure(): Use _fail_unless() instead of fail() to allow
reporting of the right line number
- add test that demonstrates the default namespace can be reset
  without a syntax error
2003-01-24 05:39:16 +00:00
Fred L. Drake, Jr.
4273b16711 Add a test that makes sure xmlns:prefix="" is allowed when namespace
processing is not enabled.
2003-01-24 05:09:42 +00:00
Fred L. Drake, Jr.
b2e6a40fbb Fix test case regarding reporting of undefined entities and
non-validating parsers (see section 5.1 of the XML 1.0 specification).
2003-01-21 05:41:24 +00:00
Fred L. Drake, Jr.
37be32f63f Minor cleanups and conformance with current recommended usage. 2003-01-20 14:49:44 +00:00
Fred L. Drake, Jr.
42dc47850e Oops, there were more regression tests for SF bug #653180; add these
as well.
2002-12-30 19:33:21 +00:00
Fred L. Drake, Jr.
d9b09dd45e Added regression tests from bug; Karl already fixed the bug itself.
Closes SF bug #653180.

Removed test that failed to tickle the bug, but should have.
2002-12-30 19:20:39 +00:00
Fred L. Drake, Jr.
843c5c4f5c Added regression test for SF bug #483514: Default handler reports
handled events.
2002-11-12 20:26:05 +00:00
Fred L. Drake, Jr.
1e4bab1724 Added regression test for SF bug #620106: XML_SetEncoding() broken
for external entities.
2002-11-12 19:22:49 +00:00
Fred L. Drake, Jr.
a515b7b01c Added regression test for SF bug #616863.
Cleaned up some indentation.
Report the version of the Expat library if not in "silent" mode.
2002-11-07 23:02:26 +00:00
Fred L. Drake, Jr.
f4befc31c3 SF bug #620343: segfault: bad API/callback interaction
The start-namespace-decl callback can set the start-element callback to
NULL, but Expat tried to call it anyway.
2002-10-08 17:04:55 +00:00
Karl Waclawek
aa6a61475b Included "invalid" test cases, to check if the parser reports them
as well-formed without errors.
2002-09-04 03:04:44 +00:00
Fred L. Drake, Jr.
8875cf76db Update to Karl's version of this script, and use the latest version of
the tests from the W3C.
2002-09-03 23:19:30 +00:00
Fred L. Drake, Jr.
8ebc3a260e New test: demonstrate segfault in epilogProcessor(). Karl has a fix
for this that he'll check in shortly.
2002-08-30 22:05:55 +00:00
Fred L. Drake, Jr.
1330c4c02f Added regression test.
Closes SF bug #600479.
2002-08-27 17:06:19 +00:00
Fred L. Drake, Jr.
a37a37af7f Add test for well-formedness constraint: No Recursion. 2002-08-24 19:53:59 +00:00
Fred L. Drake, Jr.
705efa1f25 Add a test that we do report an undefined entity if there is an
external subset and we load it.
2002-08-23 19:45:44 +00:00
Fred L. Drake, Jr.
93a409f6f6 Factor out some error reporting code used when the parser is expected
to report an error, and either doesn't report an error at all or
reports the wrong error.
2002-08-23 03:35:40 +00:00
Fred L. Drake, Jr.
80cac4a780 Renamed the last test added to be more clear about the condition being
tested.

Added a couple of additional tests checking for proper response to the
same well-formedness constraint.  No bugs to fix there, just trying to
improve the coverage of the test suite.
2002-08-23 03:14:01 +00:00
Fred L. Drake, Jr.
803bc07fa7 Add a test case for the improper reporting of a failure of the "Entity
Declared" WFC fixed in lib/xmlparse.c 1.65.
2002-08-22 21:41:05 +00:00
Fred L. Drake, Jr.
e573251a94 Define specific return values for the XML_Parse*() functions, and use them
to test all XML_Parse*() return values in the test and sample code.
This is binary-compatible with previous Expat 1.95.x releases.
2002-08-02 19:40:09 +00:00
Fred L. Drake, Jr.
3167cb2a06 Remove cruftiness. 2002-07-24 01:20:18 +00:00
Fred L. Drake, Jr.
83271c5dbf make_basic_suite(): Simplify the organization of the test cases into
just two groups: "basic" (no namespaces) and "namespace".

Rename one test function so it's name makes more sense, and is
shorter.
2002-07-22 17:49:17 +00:00
Fred L. Drake, Jr.
632b20c24f Added regression test for SF bug #584832, adapted from contributed
test.
2002-07-22 17:15:48 +00:00
Fred L. Drake, Jr.
098497fb5f Add a test for SF bug #478332.
If I understand the report correctly, I can't reproduce the bug using
the CVS version of Expat.
2002-07-09 21:17:45 +00:00
Fred L. Drake, Jr.
e43a5bc447 De-tabify. 2002-07-09 20:50:04 +00:00
Fred L. Drake, Jr.
4582daec8f Fix SF bug #575168: "Missing events for end-element". 2002-06-28 23:04:49 +00:00
Fred L. Drake, Jr.
7f509f86ef Add regression tests for SF bug #566334:
"Default namespace => wrong element names"
2002-06-28 14:20:07 +00:00
Fred L. Drake, Jr.
c74d7bca16 Add a regression test that might tickle SF bug #422239. See comments
for more information.
2002-06-28 13:35:44 +00:00
Fred L. Drake, Jr.
6f4869b2a4 Share the comment style with the rest of Expat. 2002-05-22 20:22:25 +00:00
Fred L. Drake, Jr.
219908bec6 Add a small comment to tell what this is. 2002-05-22 20:20:05 +00:00
Fred L. Drake, Jr.
6197055826 Fix the regression test for SF bug #477667. This now fails, but accurately
tests the reported bug.
It should also serve as increased motivation for me to get it fixed
before the next release.
2002-05-22 03:27:17 +00:00
Fred L. Drake, Jr.
f122dd821c Remove the use of C99's stdbool.h and the bool type; not all compilers
support this (gcc 2.8.1 on IRIX 6.5 bit this time).
2002-05-21 21:39:18 +00:00
Fred L. Drake, Jr.
7ed4ac9d81 xml_failure(): Pass the relevant XML_Parser into the function so it is
useful when parsing external entities as well as the document entity.

All callers have been updated.
2002-05-04 21:47:46 +00:00
Fred L. Drake, Jr.
d05c7a58f7 Added target to run checks based on xmlwf and James Clark's test cases.
This is not run by "make check" since it requires unzip, wget, and network
access to set up the tests.  Use "make run-xmltext" to run the tests.
2002-04-29 21:31:18 +00:00
Fred L. Drake, Jr.
0767c2ce17 Fix stupid last minute change. 2002-04-29 17:10:26 +00:00
Fred L. Drake, Jr.
d29adbd972 Added a bunch of assertions that internal assumptions are not violated
(specifically, make sure args are not NULL).

If the expected value is not the right length, include the value found in
the error message, to make problems easier to diagnose.
2002-04-29 17:09:31 +00:00
Fred L. Drake, Jr.
198ab270fe Revise the data accumulation to be at least a little separated from the
actual test code.  Not pretty & lacking in internal documentation, but
allows the test code to be a bit more readable.
2002-04-25 04:04:42 +00:00
Fred L. Drake, Jr.
d701da0bd5 Make the organization slightly easier to discern. 2002-04-25 01:42:34 +00:00
Fred L. Drake, Jr.
a1451f8ae7 Take advantage of XML_ParserReset(): Instead of creating new parsers in
run_*_check(), reset the parser between uses in the one place its actually
needed.
2002-04-24 03:48:03 +00:00
Fred L. Drake, Jr.
d2baa2aec2 Add a new test that demonstrates SF bug #481609 is invalid. 2002-04-22 18:50:18 +00:00
Fred L. Drake, Jr.
c5e5a2cab9 Test support enhancements:
_xml_failure():  Clean up the output message so the first line doesn't
    wrap in the typical case.

CharData typedef:  If count is less than 0, consider it "unset".  This
    is used in the new support to check attribute values.

accumulate_characters():  Handle storage->count < 0.  Allow XML_Char
    to be more than one byte.

accumulate_attribute():  New function: store the value of the first
    attribute encountered in parsing.  This needs the concept of a
    CharData that is unset to allow capturing a value that is an empty
    string.

check_characters():  Handle storage->count < 0.  Allow XML_Char to be
    more than one byte.

run_character_check():  Create a local parser so that both
    run_character_check() and run_attribute_check() can be used in a
    single test function.

run_attribute_check():  New function: check that the value of the
    first attribute in a document matches the expected value.
2002-04-22 18:46:00 +00:00
Fred L. Drake, Jr.
307462a492 Added test for SF bug #480278. 2002-04-20 13:19:40 +00:00
Fred L. Drake, Jr.
e2db2bc4c4 Fix typo in comment. 2002-04-20 02:53:15 +00:00
Fred L. Drake, Jr.
118257bc4c Added a test for SF bug #231864. 2002-04-19 20:59:01 +00:00
Fred L. Drake, Jr.
1258481fbc Add a test that checks that illegal UTF-8 sequences are not allowed to pass
when we are using UTF-8 encoding.
This closes SF bug #477667.
2002-04-19 19:18:35 +00:00