Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix some legacy smartlink syntax

git-svn-id: http://svn.pugscode.org/pugs@26420 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
commit 60d29c603bea72779657fdc23703ffb4e5b7fa83 1 parent 34ddbb6
szabgab authored
View
30 S03-operators/smartmatch.t
@@ -16,7 +16,7 @@ emulation.
sub eval_elsewhere($code){ eval($code) }
-#L<<S03/"Smart matching"/Any Code:($) item sub truth>>
+#L<S03/"Smart matching"/Any Code:($) item sub truth>
{
sub uhuh { 1 }
sub nuhuh { undef }
@@ -38,21 +38,21 @@ my %hash3 is context = ( "oink", "da", "blah", "zork");
my %hash4 is context = ( "bink", "yum", "gorch", "zorba");
my %hash5 is context = ( "foo", 1, "bar", 1, "gorch", undef, "baz", undef );
-#L<<S03/Smart matching/"hash keys same set">>
+#L<S03/Smart matching/"hash keys same set">
#?rakudo skip 'context variables'
{
ok eval_elsewhere('(%+hash1 ~~ %+hash2)'), "hash keys identical", :todo;
ok eval_elsewhere('!(%+hash1 ~~ %+hash4)'), "hash keys differ";
};
-#L<<S03/Smart matching/hash value slice truth>>
+#L<S03/Smart matching/hash value slice truth>
#?rakudo skip 'context variables'
{
ok(%hash1 ~~ any(%hash3), "intersecting keys", :todo);
ok(%hash1 !~~ any(%hash4), "no intersecting keys");
};
-#L<<S03/Smart matching/hash value slice truth>>
+#L<S03/Smart matching/hash value slice truth>
#?rakudo skip 'context variables'
{
my @true = (<foo bar>);
@@ -63,14 +63,14 @@ my %hash5 is context = ( "foo", 1, "bar", 1, "gorch", undef, "baz", undef );
ok(!(%hash5 ~~ @false), "value slice false");
};
-#L<<S03/Smart matching/hash value slice truth>>
+#L<S03/Smart matching/hash value slice truth>
#?rakudo skip 'context variables'
{
ok((%hash1 ~~ any(<foo bar>)), "any key exists (but where is it?)", :todo);
ok(!(%hash1 ~~ any(<gorch ding>)), "no listed key exists");
};
-#L<<S03/Smart matching/hash slice existence>>
+#L<S03/Smart matching/hash slice existence>
#?rakudo skip 'context variables'
{
ok((%hash1 ~~ all(<foo blah>)), "all keys exist", :todo);
@@ -79,7 +79,7 @@ my %hash5 is context = ( "foo", 1, "bar", 1, "gorch", undef, "baz", undef );
#Hash Rule hash key grep match if any($_.keys) ~~ /$x/
-#L<<S03/Smart matching/hash slice existence>>
+#L<S03/Smart matching/hash slice existence>
#?rakudo skip 'context variables'
{
ok((%hash5 ~~ "foo"), "foo exists", :todo);
@@ -88,7 +88,7 @@ my %hash5 is context = ( "foo", 1, "bar", 1, "gorch", undef, "baz", undef );
ok((%hash5 ~~ "wasabi"), "wasabi does not exist", :todo);
};
-#L<<S03/Smart matching/hash slice existence>>
+#L<S03/Smart matching/hash slice existence>
#?rakudo skip 'context variables'
{
my $string is context = "foo";
@@ -97,14 +97,14 @@ my %hash5 is context = ( "foo", 1, "bar", 1, "gorch", undef, "baz", undef );
ok eval_elsewhere('!(%+hash5 ~~ .{$+string})'), 'hash.{Any} untruth';
};
-#L<<S03/Smart matching/hash value slice truth>>
+#L<S03/Smart matching/hash value slice truth>
#?rakudo skip 'context variables'
{
ok eval_elsewhere('(%+hash5 ~~ .<foo>)'), "hash<string> truth";
ok eval_elsewhere('!(%+hash5 ~~ .<gorch>)'), "hash<string> untruth";
};
-#L<<S03/Smart matching/arrays are comparable>>
+#L<S03/Smart matching/arrays are comparable>
{
ok((("blah", "blah") ~~ ("blah", "blah")), "qw/blah blah/ .eq");
ok(!((1, 2) ~~ (1, 1)), "1 2 !~~ 1 1");
@@ -151,7 +151,7 @@ my %hash5 is context = ( "foo", 1, "bar", 1, "gorch", undef, "baz", undef );
ok (1..10 ~~ *,5,*), 'smartmatch with Array RHS co-erces LHS to list';
};
-#L<<S03/Smart matching/numeric equality>>
+#L<S03/Smart matching/numeric equality>
{
ok(((1, 2) ~~ any(2, 3)),
"there is intersection between (1, 2) and (2, 3)", :todo);
@@ -173,7 +173,7 @@ my %hash5 is context = ( "foo", 1, "bar", 1, "gorch", undef, "baz", undef );
"array slice .[0,1] of (0,1,2,3) is false";
};
-#L<<S03/"Smart matching"/in range>>
+#L<S03/"Smart matching"/in range>
{
ok((5 ~~ 1 .. 10), "5 is in 1 .. 10", :todo);
ok(!(10 ~~ 1 .. 5), "10 is not in 1 .. 5");
@@ -189,7 +189,7 @@ my %hash5 is context = ( "foo", 1, "bar", 1, "gorch", undef, "baz", undef );
ok((undef ~~ { 1 }), 'ignores $_');
};
-#L<<S03/Smart matching/type membership>>
+#L<S03/Smart matching/type membership>
{
class Dog {}
class Cat {}
@@ -201,13 +201,13 @@ my %hash5 is context = ( "foo", 1, "bar", 1, "gorch", undef, "baz", undef );
#Any Role role playing match if \$_.does(\$x)
-#L<<S03/Smart matching/numeric equality>>
+#L<S03/Smart matching/numeric equality>
{
ok((1 ~~ 1), "one is one");
ok(!(2 ~~ 1), "two is not one");
};
-#L<<S03/Smart matching/string equality>>
+#L<S03/Smart matching/string equality>
{
ok(("foo" ~~ "foo"), "foo eq foo");
ok(!("bar" ~~ "foo"), "!(bar eq foo)");
View
6 S05-match/capturing-contexts.t
@@ -9,7 +9,7 @@ if !eval('("a" ~~ /a/)') {
exit;
}
-# L<<S05/Return values from matches/"A match always returns a Match object" >>
+# L<S05/Return values from matches/"A match always returns a Match object" >
{
my $match = 'abd' ~~ m/ (a) (b) c || (\w) b d /;
isa_ok( $match, 'Match', 'Match object returned');
@@ -17,7 +17,7 @@ if !eval('("a" ~~ /a/)') {
ok( $/ === $match, 'Same match objects');
}
-# L<<S05/Return values from matches/"The array elements of a C<Match> object are referred to" >>
+# L<S05/Return values from matches/"The array elements of a C<Match> object are referred to" >
{
'abd' ~~ m/ (a) (b) c || (\w) b d /;
ok( $/[0] eq 'a', 'positional capture accessible');
@@ -26,7 +26,7 @@ if !eval('("a" ~~ /a/)') {
ok( $/.list.elems == 1, 'the .list methods returns a list object');
}
-# L<<S05/Return values from matches/"When used as a hash, a C<Match> object" >>
+# L<S05/Return values from matches/"When used as a hash, a C<Match> object" >
{
'abd' ~~ m/ <alpha> <alpha> c || <alpha> b d /;
ok( $/<alpha> eq 'a', 'named capture accessible');
View
2  S05-metasyntax/assertions.t
@@ -9,7 +9,7 @@ version 0.3 (12 Apr 2004), file t/assert.t.
It has (hopefully) been, and should continue to be, updated to
be valid perl6.
-# L<< S05/"Extensible metasyntax (C<< <...> >>)"/"A leading C<?{> or C<!{> indicates a code assertion:" >>
+# L<S05/"Extensible metasyntax (C<< <...> >>)"/"A leading C<?{> or C<!{> indicates a code assertion:" >
=end pod
View
4 S06-signature/slurpy-params-2.t
@@ -8,7 +8,7 @@ use Test;
These tests are the testing for "List paameters" section of Synopsis 06
-L<<S06/List parameters/Slurpy parameters follow any required>>
+L<S06/List parameters/Slurpy parameters follow any required>
You might also be interested in the thread Calling positionals by name in
presence of a slurpy hash" on p6l started by Ingo
@@ -133,7 +133,7 @@ dies_ok { foo 1, x => 20, y => 300, 4000 },
These tests are the testing for "List paameters" section of Synopsis 06
-L<<S06/List parameters/Slurpy scalar parameters capture what would otherwise be the first elements of the variadic array:>>
+L<S06/List parameters/Slurpy scalar parameters capture what would otherwise be the first elements of the variadic array:>
=end desc
View
4 S32-scalar/undef.t
@@ -272,10 +272,10 @@ Perl6-specific tests
sub bar ($bar, $baz?, :$quux) {
is($bar, "BAR", "defined param"); # sanity
- # L<<S06/Optional parameters/Missing optional arguments>>
+ # L<S06/Optional parameters/Missing optional arguments>
ok(!defined($baz), "unspecified optional param");
- # L<<S06/Named parameters/Named parameters are optional>>
+ # L<S06/Named parameters/Named parameters are optional>
ok(!defined($quux), "unspecified optional param");
}
Please sign in to comment.
Something went wrong with that request. Please try again.