Permalink
Browse files

[t/spec] remove some variable re-declarations found by STD.pm. TimToa…

…dy++

git-svn-id: http://svn.pugscode.org/pugs@25273 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent ab3a8ff commit b87b6396c38da9552598d1dd3b80a41c0ee0ee6b moritz committed Feb 10, 2009
@@ -310,14 +310,14 @@ L<"http://www.nntp.perl.org/group/perl.perl6.language/20122">
ok($pair eqv (item => $item), ':$foo syntax works');
my @arr = <a b c d e f>;
- my $pair = (:@arr);
+ $pair = (:@arr);
ok($pair eqv (arr => @arr), ':@foo syntax works');
my %hash = foo => 'bar', baz => 'qux';
- my $pair = (:%hash);
+ $pair = (:%hash);
ok($pair eqv (hash => %hash), ':%foo syntax works');
my sub code {return 42}
- my $pair = (:&code);
+ $pair = (:&code);
ok($pair eqv (code => &code), ':&foo syntax works');
}
@@ -56,12 +56,18 @@ ok $scalar.does(Object), 'value contained in a $var does Object';
-my @array;
-ok @array.does(Positional), 'unitialized @var does Positional';
-my @array = [];
-ok @array.does(Positional), 'value contained in a @var does Positional';
-my @array = 1;
-ok @array.does(Positional), 'generic val in a @var is converted to Positional';
+{
+ my @array;
+ ok @array.does(Positional), 'unitialized @var does Positional';
+}
+{
+ my @array = [];
+ ok @array.does(Positional), 'value contained in a @var does Positional';
+}
+{
+ my @array = 1;
+ ok @array.does(Positional), 'generic val in a @var is converted to Positional';
+}
for <List Seq Range Buf Capture> -> $c {
ok eval($c).does(Positional), "$c does Positional";
View
@@ -481,8 +481,8 @@ Hello, World
my $t = q:s /$s/;
is $t, $s, "Testing for q:s operator.";
- my $s = "有人在笑";
- my $t = q:s /$s/;
+ $s = "有人在笑";
+ $t = q:s /$s/;
is $t, $s, "Testing for q:s operator. (utf8)";
}
@@ -13,7 +13,7 @@ plan 16;
my $mountain = 'Hill';
$Terrain::mountain = 108;
$Terrain::Hill::mountain = 1024;
- $river = 'Terrain::Hill';
+ our $river = 'Terrain::Hill';
is($mountain, 'Hill', 'basic variable name');
is($Terrain::mountain, 108, 'variable name with package');
#?rakudo skip "Parse error"
View
@@ -71,11 +71,11 @@ plan 23;
eval_dies_ok('@data <== grep {$_ % 2} <== @data', 'a chain of feeds may not begin and end with the same array');
- my @data = <1 2 4 5 7 8>;
+ @data = <1 2 4 5 7 8>;
@data <== grep {$_ % 2} <== eager @data;
is(~@data, ~@odds, '@arr <== grep <== eager @arr works');
- my @data = <1 2 4 5 7 8>;
+ @data = <1 2 4 5 7 8>;
@data <== eager grep {$_ % 2} <== @data;
is(~@data, ~@odds, '@arr <== eager grep <== @arr works');
}
View
@@ -53,7 +53,7 @@ plan 32;
{
my @dec = 8, 7, 6 ... *;
- is @dev[0..5].join('|'), '8|7|6|5|4|3', 'magic series with decreasing values';
+ is @dec[0..5].join('|'), '8|7|6|5|4|3', 'magic series with decreasing values';
}
{

0 comments on commit b87b639

Please sign in to comment.