chiark / gitweb /
break out $sre
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Oct 2020 19:00:21 +0000 (20:00 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 5 Oct 2020 19:00:21 +0000 (20:00 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
extract-bf-tests

index b23f8693d277f01859913cdada074ba2eeffff08..492f3011a3deb6e0822e397b2b67af71406af946 100755 (executable)
@@ -6,8 +6,11 @@ sub chk_repr ($) {
   print "assert_eq($p, Bigfloats.pack(Bigfloats.unpack($p as any)));\n";
 }
 
+my $sre = qr{\"[^"]+\"};
+
 while (<>) {
   next unless m/^mod test/..0;
   my $l = $_;
-  $l =~ s{bf\((\"[^"]+\")\)}{ chk_repr($1) }ge;
+  $l =~ s{bf\(($sre)\)}{ chk_repr($1) }ge;
+  
 }