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/chainlint-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 / chainlint-cat.pl` 29 lines ยท 709 bytes Raw Blame History 1 #!/usr/bin/env perl 2 3 my $outdir = shift; 4 open(my $tests, '>', "$outdir/tests") 5 or die "unable to open $outdir/tests: $!"; 6 open(my $expect, '>', "$outdir/expect") 7 or die "unable to open $outdir/expect: $!"; 8 9 print $expect "# chainlint: $outdir/tests\n"; 10 11 my $offset = 0; 12 for my $script (@ARGV) { 13 print $expect "# chainlint: $script\n"; 14 15 open(my $expect_in, '<', "chainlint/$script.expect") 16 or die "unable to open chainlint/$script.expect: $!"; 17 while (<$expect_in>) { 18 s/^\d+/$& + $offset/e; 19 print $expect $_; 20 } 21 22 open(my $test_in, '<', "chainlint/$script.test") 23 or die "unable to open chainlint/$script.test: $!"; 24 while (<$test_in>) { 25 /^# LINT: / and next; 26 print $tests $_; 27 $offset++; 28 } 29 }