hmurray at megapathdsl.net
Fri Jun 22 02:38:08 UTC 2018
esr at thyrsus.com said:
> If we had introspection in the target language we would automatically get the
> entire parse structure when we dumped each syntax tree, rather than an ad-hoc
> representation that's mostly leaf nodes. We would also get things like
> dumping the composed filter blocks from multiple restrictions rather than
> each partial specification.
I'm not on the right wavelength.
Do you want to test the parser, or the restriction setup/lookup routines?
My proposal of "just" print out the info from the leaf node callout routines
only checks the parser. It's not hard to implement. If you were working in
that area, it would be reassuring that you hadn't broken anything.
It would be nice to test the restrictions. We can do part of that by putting
the data into a config file and using the parser to load the internal data
structures. Printing those out is only half the story. We also went to test
the lookup routines.
With the current test structure, we could load them by hand by calling the
parser callout routine for that leaf node to setup something, and then calling
the lookup routines by hand.
The authkeys area has the same problem/opportunity. (There is a mini-parser
in authreadkeys.) The current authkeys testing inserts data by hand rather
than using the parser.
There is an area I haven't thought about much. How do we check the error cases?
The leap-second stuff has another mini-parser. I think there are tests for it that read in a file.
These are my opinions. I hate spam.
More information about the devel