4 BEGIN {plan tests => 1}
7 #----------------------------------------------------------------------
9 # Also tests flags -ce and -l=60
10 # Note that we have to use -npro to avoid using local .perltidyrc
11 #----------------------------------------------------------------------
13 $seqno = $type_sequence[$i];
15 if (tok =~/[\(\[\{]/) {
16 $indentation{$seqno} = indentation
19 elsif (tok =~/[\)\]\}]/) {
20 $min_indentation = $indentation{$seqno}
21 delete $indentation{$seqno}
22 if ($indentation < $min_indentation) {$indentation = $min_indentation}
30 destination => \@tidy_output,
32 argv => '-nsyn -ce -npro -l=60',
35 my @expected_output=<DATA>;
37 if (@expected_output == @tidy_output) {
38 while ( $_ = pop @tidy_output ) {
39 my $expect = pop @expected_output;
40 if ( $expect ne $_ ) {
41 print STDERR "got:$_";
43 print STDERR "expected_output:$expect";
50 print STDERR "Line Counts differ\n";
55 # This is the expected result of 'perltidy -ce -l=60' on the above string:
58 $seqno = $type_sequence[$i];
60 if ( tok =~ /[\(\[\{]/ ) {
61 $indentation{$seqno} = indentation;
63 } elsif ( tok =~ /[\)\]\}]/ ) {
65 $indentation{$seqno} delete $indentation{$seqno}
66 if ( $indentation < $min_indentation )
68 $indentation = $min_indentation;