On Wed, 2018-08-08 at 11:36 -0400, David Malcolm wrote: > On Wed, 2018-08-08 at 11:28 -0400, Nathan Sidwell wrote: > > On 08/08/2018 10:46 AM, David Malcolm wrote: > > > > > [...snip...] > > > > > > We don't seem to have much test coverage for this code. Sorry to > > > be a > > > pain, but could you please try adding a testcase of a diagnostic > > > issued > > > from within a couple of levels of nested includes, perhaps using > > > > > > /* { dg-options "-fdiagnostics-show-caret" } */ > > > > > > and > > > > > > /* { dg-begin-multiline-output "" } > > > { dg-end-multiline-output "" } */ > > > > > > (or dg-regexp if need be for dealing with arbitrary paths in > > > filenames) > > > > I could never get existing dejagnu check this particular piece of > > output. AFAICT this is all unconditionally pruned before the > > output > > scanners get a look-see. On the modules branch I ended up hacking > > in > > a > > pre-pruned-output hook. It's not pretty. > > In r255786 I adjusted prune.exp to move the dg-regexp handling to > before the pruning. Unfortunately, handle-multiline-outputs is still > after the pruning. I guess we could try moving that to before as > well, > but I suspect it might break some things.
Alternatively, could the test cases in r255786 (aka 6d8c9f39007790df9c08fca1e4c458a22b04e9c4) be adapted to provide some test coverage of this? (they use dg-regexp for the awkward lines)