On Sat, Mar 15, 2025 at 05:34:21PM +0100, Jakub Jelinek via Gcc wrote:
> So, if you have test-0001.cob and test-0001.expected-output, you could do
> for i in *.cob; do \
> sed 's/\([].*()[]\)/\\\1/g;s/^/*> { dg-output {/;s/$/(\\n|\\r\\n|\\r)} 
> }/;$s/.\{12\}} }$/} }/' \
> < $i.expected-output >> $i.cob; done
> to turn the expected output into dg-output directives.
> Maybe I've missed some characters that also need to be backslash prefixed, in
> that case they'd go next to the .*() part early in the regexp.

Like ^$\ are certainly missing.

        Jakub

Reply via email to