File: filter4.t

package info (click to toggle)
libspiffy-perl 0.21-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 256 kB
  • ctags: 99
  • sloc: perl: 1,067; makefile: 50
file content (34 lines) | stat: -rw-r--r-- 516 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use lib 't', 'lib';
use strict;

use Test::More tests => 1;
use Spiffy '-filter_save';
use Filter4;

my $result = $Spiffy::filter_result;
my $expected = do { local $/; <DATA> };
$result =~ s/\r//g;
$expected =~ s/\r//g;
is($result, $expected);

__DATA__
use strict;use warnings;my($bar,$bam);# comment

sub foo {my $self = shift;
    my $x = $self->$bar;
}

$bar = sub {my $self = shift;
    if (1) {
        my $y = 1;
    }
};

sub baz {
    my $z = 1;
}

$bam = sub {my $self = shift;
    $self->$bar(42);
};
;1;