Re: expat/tests runtests.c,1.43,1.44

"Karl Waclawek" <[email protected]>
Newsgroups gmane.text.xml.expat.cvs
Message-ID <000f01c2c3c6$37dac3e0$9e539696@citkwaclaww2k>
> Karl Waclawek writes:
>  > Should have looked more closely before.
>  > You are using thee wrong type of document.
>  > 
>  > xmlns='' is OK, but xmlns:pre='' is not.
> 
> You're still looking at the wrong test; test_ns_default_with_empty_uri
> passes as expected.
> 
>  > This is Jeremy's test document:
>  > 
>  > <?xml version='1.0'?> 
>  > <docelem xmlns:pre=""/> 
> 
> If I modify test_ns_prefix_with_empty_uri_2 to use exactly this
> document:
> 
> /* Regression test #2 for SF bug #673791. */
> START_TEST(test_ns_prefix_with_empty_uri_2)
> {
>     char *text =
>         "<?xml version='1.0'?>\n"
>         "<docelem xmlns:pre=''/>";
> 
>     expect_failure(text,
>                    XML_ERROR_SYNTAX,
>                    "Did not report setting namespace URI with prefix to ''.");
> }
> END_TEST
> 
> ...the test fails.  Is this test wrong?


I am confused now - I never saw a test case that checks that
Jeremy's document is in error. 

Your two test cases so far, check that:
- default namespace can be empty,
- xmlns:prefix='' is allowed when namespace processing is turned off

Am I right?
Now, we need a test case that checks that xmlns:prefix='' is
an error when namespace processing is on. This newest test case
above seems to be the one.

What do you mean with : this test fails?
I mean: Expat should return an error and the test case should
expect that error. Are you saying that in the above test case,
Expat does *not* return an error?

Karl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.