RTEMS FORTRAN Pattern Failures
Tobias Burnus
burnus@net-b.de
Mon Jan 12 21:18:00 GMT 2015
Hi Joel,
Am 12.01.2015 um 22:04 schrieb Joel Sherrill:
> That was very close.
>
> cat out.txt | \
> perl -e '$in = join("", <STDIN>); if ($in =~ m/^1 2 3(\n|\r\n|\r)1 2
> 3(\n|\r\n|\r)((\n|\r\n|\r)\*\*\* EXIT code 0)(\n|\r\n|\r)?$/s) { print
> "matched\n" } else { print "not matched\n" };'
That won't work on systems which don't print EXIT. You have to move the
")" from after the "0" to before the "?" to make the whole part as
optional (the ? applies to the preceding token).
> I think I mainly fixed the first line to have two spaces between the 2 and 3
> and added another the EOL pattern at the end.
The former was a bug (feature) of Thunderbird, which ate the second
space, the second, I forgot.
> That just leaves translating that back into DejaGNU/Expect. :)
Well, that's simple: Either remove all "dg-output" from the test case
and add the string between "m/" and "/s" instead of ... in
C { dg-output "..." }
You additionally have to change "\*" to "\\*" and "$" to "\$".
Or, alternatively, only modify the last "dg-output" by replacing "\$" by
the string starting with "((" and ending with "$". (Again, you have to
replace \* by \\* and $ by \$.)
That should be all. I wonder whether that now works or still fails.
Can you try whether this works (see attachment)?
Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.diff
Type: text/x-patch
Size: 606 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20150112/d74b0c5e/attachment.bin>
More information about the Gcc
mailing list