Changeset 2213
- Timestamp:
- 12/28/08 07:12:04 (3 years ago)
- Location:
- trunk/Padre
- Files:
-
- 1 added
- 2 edited
-
lib/Padre/Document/Perl/Beginner.pm (modified) (1 diff)
-
t/75-perl-beginner.t (modified) (2 diffs)
-
t/files/beginner/warning.pl (added)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/lib/Padre/Document/Perl/Beginner.pm
r2212 r2213 77 77 } 78 78 } 79 if ($text =~ /use\s+warning\s*;/) { 80 $self->{error} = "You need to write use warnings (with an s at the end) and not use warning."; 81 return; 82 } 83 79 84 return 1; 80 85 } -
trunk/Padre/t/75-perl-beginner.t
r2212 r2213 17 17 BEGIN { $tests += 1; } 18 18 19 my %tests = ( 20 'split1.pl' => "The second parameter of split is a string, not an array", 21 'split2.pl' => "The second parameter of split is a string, not an array", 22 ); 19 my %tests; 20 BEGIN { 21 %tests = ( 22 'split1.pl' => "The second parameter of split is a string, not an array", 23 'split2.pl' => "The second parameter of split is a string, not an array", 24 'warning.pl' => "You need to write use warnings (with an s at the end) and not use warning.", 25 ); 26 } 23 27 24 28 foreach my $file (keys %tests) { … … 26 30 ok(! defined($b->check($data)), $file); 27 31 is($b->error, $tests{$file}, "$file error"); 28 BEGIN { $tests += 2 * 2; }32 BEGIN { $tests += 2 * keys %tests; } 29 33 } 30 34
Note: See TracChangeset
for help on using the changeset viewer.
