Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/t/greplint-cat.pl # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / t / greplint-cat.pl` 27 lines ยท 700 bytes Raw Blame History 1 #!/usr/bin/env perl 2 3 use strict; 4 use warnings; 5 6 # Assemble expected output for check-greplint target. 7 # Usage: greplint-cat.pl ... 8 # 9 # For each , reads greplint/.expect and 10 # prepends "greplint/.test:" to every non-empty line, 11 # matching the output format of greplint.pl. Writes combined 12 # expected output to /expect. 13 14 my $outdir = shift; 15 open(my $expect, '>', "$outdir/expect") 16 or die "unable to open $outdir/expect: $!"; 17 18 for my $name (@ARGV) { 19 open(my $fh, '<', "greplint/$name.expect") 20 or die "unable to open greplint/$name.expect: $!"; 21 while (<$fh>) { 22 print $expect "greplint/$name.test:$_"; 23 } 24 close $fh; 25 } 26 27 close $expect;