Changeset 7819
- Timestamp:
- 09/10/09 02:30:00 (2 years ago)
- File:
-
- 1 edited
-
trunk/Padre/t/75-perl-beginner.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Padre/t/75-perl-beginner.t
r5914 r7819 26 26 ); 27 27 28 plan( tests => scalar(keys %TEST) * 2 + 2);28 plan( tests => scalar(keys %TEST) * 2 + 14 ); 29 29 30 30 use Padre::Document::Perl::Beginner; … … 72 72 } 73 73 74 # No need to create files for all of these: 75 # Notice: Text matches are critical as texts may change without notice! 76 $b->check('join(",",map { 1; } (@INC),"a");'); 77 ok($b->error =~ /map/,'map arguments'); 78 79 $b->check('package DB;'); 80 ok($b->error =~ /DB/,'kill Perl debugger (1)'); 81 82 $b->check('package DB::Connect;'); 83 ok($b->error =~ /DB/,'kill Perl debugger (2)'); 84 85 $b->check('$X = chomp($ARGV[0]);'); 86 ok($b->error =~ /chomp/,'chomp return value'); 87 88 $b->check('join(",",map { s/\//\,/g; } (@INC),"a");'); 89 ok($b->error =~ /map/,'substitution in map (1)'); 90 91 $b->check('join(",",map { $_ =~ s/\//\,/g; } (@INC),"a");'); 92 ok($b->error =~ /map/,'substitution in map (2)'); 93 94 $b->check('for (<@INC>) { 1; }'); 95 ok($b->error =~ /Perl6/,'Perl6 loop syntax in Perl5'); 96 97 $b->check('if ($_ = 1) { 1; }'); 98 ok($b->error =~ /\=/,'assign instead of compare'); 99 100 $b->check('open file,"free|tail"'); 101 ok($b->error =~ /open/,'pipe-open without in or out redirection (2 args)'); 102 103 $b->check('open file,">","free|tail"'); 104 ok($b->error =~ /open/,'pipe-open3 without in or out redirection (3 args)'); 105 106 $b->check('open file,"|cat|"'); 107 ok($b->error =~ /open/,'pipe-open with in and out redirection (2 args)'); 108 109 $b->check('open file,"|cat|"'); 110 ok($b->error =~ /open/,'pipe-open with in and out redirection (3 args)'); 111 74 112 sub slurp { 75 113 my $file = shift;
Note: See TracChangeset
for help on using the changeset viewer.
