Skip to content

Commit

Permalink
Perlito5 - test - array interpolation pass
Browse files Browse the repository at this point in the history
  • Loading branch information
fglock committed Apr 9, 2015
1 parent 4b1ecd3 commit 64ffb5d
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions t5/base/lex.t
@@ -1,7 +1,7 @@
#!./perl

#print "1..57\n";
print "1..46\n";
print "1..47\n";

$x = 'x';

Expand Down Expand Up @@ -237,16 +237,16 @@ print (((q{{\{\(}} . q{{\)\}}}) eq '{{\(}{\)}}') ? "ok 29\n" : "not ok 29\n");
print "ok $test\n";
++$test;

## # This isn't actually a lex test, but it's testing the same feature
## sub makearray {
## my @array = ('fish', 'dog', 'carrot');
## *R::crackers = \@array;
## }
##
## eval(q{makearray(); ">@R::crackers<" eq ">fish dog carrot<"})
## || print "# $@", "not ";
## print "ok $test\n";
## ++$test;
# This isn't actually a lex test, but it's testing the same feature
sub makearray {
my @array = ('fish', 'dog', 'carrot');
*R::crackers = \@array;
}

eval(q{makearray(); ">@R::crackers<" eq ">fish dog carrot<"})
|| print "# $@", "not ";
print "ok $test\n";
++$test;
}
##
# Tests 52-54
Expand All @@ -259,7 +259,7 @@ print (((q{{\{\(}} . q{{\)\}}}) eq '{{\(}{\)}}') ? "ok 29\n" : "not ok 29\n");
xyz::bar => 1,
);

my $test = 43;
my $test = 44;
print ((exists $str{foo} ? "" : "not ")."ok $test\n"); ++$test;
print ((exists $str{bar} ? "" : "not ")."ok $test\n"); ++$test;
print ((exists $str{xyz::bar} ? "" : "not ")."ok $test\n"); ++$test;
Expand All @@ -274,4 +274,4 @@ print (((q{{\{\(}} . q{{\)\}}}) eq '{{\(}{\)}}') ? "ok 29\n" : "not ok 29\n");
# Is "[~" scanned correctly?
@a = (1,2,3);
print "not " unless($a[~~2] == 3);
print "ok 46\n";
print "ok 47\n";

0 comments on commit 64ffb5d

Please sign in to comment.