2 # Copyright (C) 2006-2009, Parrot Foundation.
8 use lib qw( . lib ../lib ../../lib );
9 use Parrot::Distribution;
10 use Test::More tests => 1;
11 use Parrot::Test::Util::Runloop;
12 use Parrot::Config qw/ %PConfig /;
17 t/codingstd/trailing_space.t - checks for superfluous trailing space or tab characters
22 % prove t/codingstd/trailing_space.t
25 % perl t/codingstd/trailing_space.t src/foo.c include/parrot/bar.h
29 Checks that files don't have trailing space or tab characters between the
30 last nominal character on the line and the end of line character.
34 L<docs/pdds/pdd07_codingstd.pod>
38 my $DIST = Parrot::Distribution->new;
39 my @files = @ARGV ? <@ARGV> : (
40 $DIST->get_c_language_files(),
41 $DIST->get_make_language_files(),
42 $DIST->get_perl_language_files(),
43 $DIST->get_pir_language_files(),
46 # skip files listed in the __DATA__ section
47 my $build_dir = $PConfig{build_dir};
53 $_ = File::Spec->catfile($build_dir, $_);
57 Parrot::Test::Util::Runloop->testloop(
58 name => 'no trailing whitespace',
59 files => [grep {not $skip_files{$_->path}} @files],
60 per_line => sub { $_[0] !~ m{[ \t]$}m },
61 diag_prefix => 'Trailing space or tab char found'
66 # cperl-indent-level: 4
69 # vim: expandtab shiftwidth=4:
72 # generated by tools/dev/nci_thunk_gen.pir
74 src/nci/extra_thunks.c
77 t/library/getopt_obj.t