- From: Steven Pemberton <steven.pemberton@cwi.nl>
- Date: Tue, 08 Feb 2022 14:55:43 +0000
- To: "C. M. Sperberg-McQueen" <cmsmcq@blackmesatech.com>, "Norm Tovey-Walsh" <norm@saxonica.com>
- Cc: public-ixml@w3.org
As author of the test, let me say: The test is meant to check that [] correctly fails to match any input. The grammar is correct, but it is unable to match any input, since [] never matches. So whatever input it receives, it will fail to find a parse. The test should succeed if it fails to match its input. Steven On Saturday 05 February 2022 15:24:49 (+01:00), C. M. Sperberg-McQueen wrote: > > Norm Tovey-Walsh writes: > > > Test elem1 is: > > > a: "a", b, c. > > b: "b", c, d. > > c: "c", []. {it should block here, since nothing matches} > > d: "d". > > > And it’s a syntax test that is suppose to fail: > > > <test-case name="elem1"> > > <test-string-ref href="elem1.ixml"/> > > <result><assert-not-a-sentence/></result> > > </test-case> > > > I interpret the comment to mean that this test should fail because “[]” > > isn’t valid, but that’s not right: > > > -set: -"[", s, member*(-[";|"], s), -"]", s. > > > What am I failing to understand about this test? > > Good catch. > > One possibility is that the test case was formulated before the grammar > of character sets was changed to allow them to be empty; against the > then-current ixml specification grammar, it would not be grammatical. > > But the phrasing of the comment would be distinctly odd in that case: > given the old definition of character sets, the natural description of > [] is that it's an error, not that it matches nothing. > > The second possibility that occurs to me is that the test case ended up > in the wrong directory. It looks to me (by eye) like a perfectly fine > grammar, so it does not belong in a directory of non-conforming > grammars. (It would be less of an outlier in Steven's tests/ > directory, I think.) > > Since I'm always reluctant to let a good test go to waste, my > inclination would be to move it to the tests-SP-MSM directory, give it > some inputs, and specify that none of the inputs are sentences. > > My two cents. > > Michael > >
Received on Tuesday, 8 February 2022 14:56:07 UTC