Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Perlito5 - tests - add AUTOLOAD tests
  • Loading branch information
fglock committed Nov 21, 2012
1 parent 98415bf commit 8d65dd4
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions t5/01-perlito/32-autoload-method.t
@@ -0,0 +1,28 @@
use feature 'say';
use strict;

say "1..4";

{
package A;

our $AUTOLOAD;

sub AUTOLOAD {
say "# A::AUTOLOAD @_";
print "not " if $_[0] ne 'A';
say "ok 1";
print "not " if $_[1] != 123;
say "ok 2";
say "# $AUTOLOAD";
print "not " if $AUTOLOAD ne "A::a";
say "ok 3";
return 456;
}

my $v = A->a(123);
print "not " if $v != 456;
say "ok 4";
}


0 comments on commit 8d65dd4

Please sign in to comment.