comparison t/whitespace.t @ 0:30782bb1fc04 MEMCACHED_1_2_3

memcached-1.2.3
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 23 Sep 2007 03:58:34 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:30782bb1fc04
1 #!/usr/bin/perl
2 use strict;
3 use FindBin qw($Bin);
4 our @files;
5
6 BEGIN {
7 chdir "$Bin/.." or die;
8 @files = grep {! /^config.h$/ } (glob("*.h"), glob("*.c"), glob("*.ac"), "memcached.spec");
9 }
10 use Test::More tests => scalar(@files);
11
12 foreach my $f (@files) {
13 open(my $fh, $f) or die;
14 my $before = do { local $/; <$fh>; };
15 close ($fh);
16 my $after = $before;
17 $after =~ s/\t/ /g;
18 $after =~ s/ +$//mg;
19 $after .= "\n" unless $after =~ /\n$/;
20 ok ($after eq $before, "$f (see devtools/clean-whitespace.pl)");
21 }