Permalink
Browse files

[t/spec] patching difficulties spotted by STD

git-svn-id: http://svn.pugscode.org/pugs@27152 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent b6e5936 commit db108703dd7867b4db2e9ad885015ece21872b46 lwall committed Jun 20, 2009
Showing with 16 additions and 17 deletions.
  1. +8 −9 S02-builtin_data_types/declare.t
  2. +2 −2 S02-literals/quoting.t
  3. +2 −2 S05-grammar/std.t
  4. +1 −1 S32-io/IO-Socket-INET.t
  5. +2 −2 S32-num/rand.t
  6. +1 −1 S32-num/roots.t
@@ -296,24 +296,23 @@ plan 85;
}
{
- sub bar() { say 'blah' };
- my Sub $rr=&bar;
+ my sub bar() { say 'blah' };
+ my Sub $rr = &bar;
isa_ok($rr, Sub );
}
-#This test might be written incorrectly TODO AUDIT
#?rakudo skip 'Sub Cannot handle typed variables with sigil &'
{
- sub baz() { return 1;};
- sub bar() { return baz;} ;
- my Sub &foo = &bar;
+ my sub baz() { return 1;};
+ my sub bar() { return baz;} ;
+ my &foo := &bar;
is(&foo(), 1,'nested sub call');
}
{
- sub baz() { return 1;};
- sub bar() { return baz;} ;
- my $foo = &bar;
+ my sub baz() { return 1;};
+ my sub bar() { return baz;} ;
+ my $foo = &bar;
is($($foo()), 1, 'nested sub call');
}
@@ -437,7 +437,7 @@ Hello, World
# q:f
#?rakudo skip 'quoting adverbs'
{
- sub f { "hello" };
+ my sub f { "hello" };
my $t = q:f /&f(), world/;
is $t, f() ~ ", world", "Testing for q:f operator.";
@@ -449,7 +449,7 @@ Hello, World
# q:c
#?rakudo skip 'quoting adverbs'
{
- sub f { "hello" };
+ my sub f { "hello" };
my $t = q:c /{f}, world/;
is $t, f() ~ ", world", "Testing for q:c operator.";
}
View
@@ -1,9 +1,9 @@
use v6;
-use Test;
+need Test, STD;
plan 1;
# test some STD methods
-my $match = STD::parse('say <OH HAI>');
+my $match = STD.parse('say <OH HAI>');
is(~$match, 'say <OH HAI>', '.parse works on STD');
@@ -9,7 +9,7 @@ plan 3;
my $host = '127.0.0.1'; # or 'localhost' may be friendlier
# To find an free port, list the ports currently in use.
-my ( $host, @ports, $netstat_cmd, $netstat_pat, $received, $expected );
+my ( @ports, $netstat_cmd, $netstat_pat, $received, $expected );
given $*OS {
when 'linux' {
$netstat_cmd = "netstat --tcp --all --numeric";
View
@@ -33,7 +33,7 @@ test_rand_range(11);
lives_ok { srand(1) }, 'srand(1) lives and parses';
{
- sub repeat_rand ($seed) {
+ my sub repeat_rand ($seed) {
srand($seed);
for 1..99 { rand; }
return rand;
@@ -50,7 +50,7 @@ lives_ok { srand(1) }, 'srand(1) lives and parses';
}
{
- sub repeat_rand ($seed) {
+ my sub repeat_rand ($seed) {
srand(:x($seed));
for 1..99 { rand; }
return rand;
View
@@ -1,5 +1,5 @@
use v6;
-use Test;
+use Test <plan ok>;
plan 44;
# L<S32::Numeric/Num/"=item roots">

0 comments on commit db10870

Please sign in to comment.