summaryrefslogtreecommitdiff
path: root/t/fort2.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/fort2.sh')
-rw-r--r--t/fort2.sh15
1 files changed, 12 insertions, 3 deletions
diff --git a/t/fort2.sh b/t/fort2.sh
index cba91f9a8..00728d360 100644
--- a/t/fort2.sh
+++ b/t/fort2.sh
@@ -67,9 +67,18 @@ touch hello.f90 foo.f95 sub/bar.f95 hi.f03 sub/howdy.f03 greets.f08 \
sub/bonjour.f08 bye.f95 sub/baz.f90
run_make -O -- -n \
- FCFLAGS_f90=--@90 FCFLAGS_f95=--@95 FCFLAGS_f03=--@03 FCFLAGS_f08=--@08
-# To make it easier to have stricter grepping below.
-sed -e 's/[ ][ ]*/ /g' -e 's/^/ /' -e 's/$/ /' stdout > out
+ FCFLAGS_f90=--@90 FCFLAGS_f95=--@95 FCFLAGS_f03=--@03 FCFLAGS_f08=--@08 \
+# To make it easier to have stricter grepping below.
+$PERL -e '
+ undef $/;
+ $_ = <>;
+ s/[^\\]\\\n/ /g;
+ s/^/ /;
+ s/\n/ \n /g;
+ s/[ \t]+/ /g;
+ s/\n\s*\z/\n/;
+ print;
+' <stdout >out
cat out
grep ' fake-fc .* --@90 .* hello\.f90 ' out