Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Shrink lines in protocol.txt to fit within 80 columns.
Also wrote a new test that will ensure that that never happens again.
- Loading branch information
Showing
2 changed files
with
80 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/perl | ||
use strict; | ||
use FindBin qw($Bin); | ||
our @files; | ||
|
||
BEGIN { | ||
chdir "$Bin/.." or die; | ||
@files = ( "doc/protocol.txt" ); | ||
} | ||
|
||
use Test::More tests => scalar(@files); | ||
|
||
foreach my $f (@files) { | ||
open(my $fh, $f) or die("Can't open $f"); | ||
my @long_lines = (); | ||
my $line_number = 0; | ||
while(<$fh>) { | ||
$line_number++; | ||
if(length($_) > 80) { | ||
push(@long_lines, $line_number); | ||
} | ||
} | ||
close($fh); | ||
ok(@long_lines == 0, "$f has a long lines: @long_lines"); | ||
} |