Skip to content
Browse files

[t/spec] move smartlinks from POD to ordinary comments

our current implementation does not find them in POD sections.
Also remove some redundant POD blocks.

git-svn-id: http://svn.pugscode.org/pugs@27845 c213334d-75ef-0310-aa23-eaa082d1ae64
  • Loading branch information...
1 parent 1507796 commit eda6db146bcafb13004bd65c26247fc61229883f moritz committed Aug 2, 2009
View
9 S02-magicals/block.t
@@ -6,21 +6,18 @@ use Test;
This tests the &?BLOCK magical from Synopsis 6
-L<S06/The C<&?BLOCK> object>
-
=end description
-plan 1;
+# L<S06/The C<&?BLOCK> object>
-#?rakudo emit skip_rest('Parse error');
+plan 1;
-#?rakudo emit =begin parse
# L<S02/Names/Which block am I in?>
# L<S06/The C<&?BLOCK> object/tail-recursion on an anonymous block:>
my $anonfactorial = -> Int $n { $n < 2 ?? 1 !! $n * &?BLOCK($n-1) };
my $result = $anonfactorial(3);
is($result, 6, 'the $?BLOCK magical worked');
-#?rakudo emit =end parse
+# vim: ft=perl6
View
4 S03-junctions/basic.t
@@ -10,10 +10,10 @@ More Junction Tests
These tests are derived from the Perl6 and Parrot Essentials Chapter 4, page 42
-L<S03/Junctive operators/>
-
=end pod
+# L<S03/Junctive operators/>
+
my $j = any(1, 2, 3);
ok $j ~~ Junction, '$j is a Junction';
View
8 S03-junctions/misc.t
@@ -152,10 +152,10 @@ Tests junction examples from Synopsis 03
j() is used to convert a junction to canonical string form, currently
just using .perl until a better approach presents itself.
-L<S03/Junctive operators>
-
=end description
+# L<S03/Junctive operators>
+
# Canonical stringification of a junction
sub j (Junction $j) { return $j.perl }
@@ -227,8 +227,6 @@ sub j (Junction $j) { return $j.perl }
These are implemented but still awaiting clarification on p6l.
-L<S03/Junctive operators/They thread through operations>
-
On Fri, 2005-02-11 at 10:46 +1100, Damian Conway wrote:
> Subject: Re: Fwd: Junctive puzzles.
>
@@ -238,6 +236,8 @@ L<S03/Junctive operators/They thread through operations>
=end description
+# L<S03/Junctive operators/They thread through operations>
+
#?rakudo skip 'Junctions of Code Objects'
{
my @subs = (sub {3}, sub {2});
View
4 S03-operators/list-quote-junction.t
@@ -32,10 +32,10 @@ is different from
say( (any <foo bar baz>), "Hello World")
-L<S03/Changes to Perl 5 operators/"Note that Perl 6 is making a consistent">
-
=end kwid
+# L<S03/Changes to Perl 5 operators/"Note that Perl 6 is making a consistent">
+
my @matching_strings = <foo bar>;
my @nonmatching_strings = ('fo','foo ', 'foo bar baz', 'oo', 'bar b', 'bar baz');
View
6 S03-operators/spaceship.t
@@ -2,11 +2,7 @@ use v6;
use Test;
-=begin kwid
-
-The spaceship operator parses incorrectly in multiple ways
-
-=end kwid
+# L<S03/Nonchaining binary precedence/Sort comparisons>
plan 5;
View
4 S03-operators/value_equivalence.t
@@ -4,8 +4,6 @@ use Test;
=begin pod
-L<S03/"Chaining binary precedence" /Value identity>
-
C<===> and C<eqv> are 2 distinct operators, where C<===> tests value
equivalence for immutable types and reference equivalence for
mutable types, and C<eqv> tests value equivalence for snapshots of mutable
@@ -14,6 +12,8 @@ false, and C<[1,2] eqv [1,2]> returns true.
=end pod
+# L<S03/"Chaining binary precedence" /Value identity>
+
plan 52;
# === on values
View
2 S04-blocks-and-statements/pointy.t
@@ -8,8 +8,6 @@ plan 17;
Test pointy sub behaviour described in S06
-L<S06/""Pointy blocks"">
-
=end description
# L<S06/""Pointy blocks""/"parameter list of a pointy block does not require
View
18 S04-statements/lazy.t
@@ -2,23 +2,7 @@ use v6;
use Test;
-=begin pod
-=head1 DESCRIPTION
-
-This test tests nothingmuch's C<lazy> proposal.
-
-This proposal was accepted on 2005-08-23 in a p6l post by Larry
-L<"http://www.nntp.perl.org/group/perl.perl6.language/22890">:
-
- > Which already seems to be there with
- >
- > lazy {...}
- >
- > which is, I presume, mostly syntactic sugar for something like:
- >
- > sub is cached {...}
-
-=end pod
+# L<S04/Other C<do>-like forms/lazy>
plan 15;
View
4 S05-mass/stdrules.t
@@ -10,10 +10,10 @@ version 0.3 (12 Apr 2004), file t/stdrules.t.
It has (hopefully) been, and should continue to be, updated to
be valid perl6.
-L<S05/Extensible metasyntax (C<< <...> >>)/"The special named assertions include">
-
=end pod
+# L<S05/Extensible metasyntax (C<< <...> >>)/"The special named assertions include">
+
plan 183;
if !eval('("a" ~~ /a/)') {
View
3 S06-currying/mixed.t
@@ -5,14 +5,15 @@ use Test;
=begin description
Tests curried subs as defined by
-L<S06/Currying>
= TODO
* assuming on a use statement
=end description
+# L<S06/Currying>
+
plan 13;
sub foo ($x?, $y?, $z = 'd') {
View
4 S06-operator-overloading/sub.t
@@ -8,10 +8,10 @@ plan 44;
Testing operator overloading subroutines
-L<S06/"Operator overloading">
-
=end pod
+# L<S06/"Operator overloading">
+
# This set of tests is very basic for now.
# TODO: all variants of overloading syntax (see spec "So any of these")
View
4 S06-other/anon-hashes-vs-blocks.t
@@ -18,10 +18,10 @@ say '$hash<1><4>.WHAT = ', $hash<1><4>.perl;
Also with array refs nested in hash refs.
-L<S06/Anonymous hashes vs blocks>
-
=end pod
+# L<S06/Anonymous hashes vs blocks>
+
plan 8;
my $hash = {
View
4 S06-routine-modifiers/lvalue-subroutines.t
@@ -8,10 +8,10 @@ plan 14;
Testing lvalue-returning subroutines
-L<S06/"Lvalue subroutines">
-
=end description
+# L<S06/"Lvalue subroutines">
+
# Lvalue subrefs
{
my $var1 = 1;
View
3 S06-signature/defaults.t
@@ -5,10 +5,11 @@ use Test;
=begin description
Tests assigning default values to variables of type code in sub definitions.
-L<S06/Optional parameters/Default values can be calculated at run-time>
=end description
+# L<S06/Optional parameters/Default values can be calculated at run-time>
+
plan 3;
sub doubler($x) { return 2 * $x }
View
3 S06-signature/slurpy-params.t
@@ -193,10 +193,11 @@ Blechschmidt L<http://www.nntp.perl.org/group/perl.perl6.language/22883>
These tests are the testing for "List parameters" section of Synopsis 06
-L<S06/List parameters/Slurpy scalar parameters capture what would otherwise be the first elements of the variadic array:>
=end desc
+# L<S06/List parameters/Slurpy scalar parameters capture what would otherwise be the first elements of the variadic array:>
+
{
sub first(*$f, *$s, *@r){ return $f };
sub second(*$f, *$s, *@r){ return $s };
View
4 S06-traits/misc.t
@@ -8,10 +8,10 @@ plan 20;
Testing parameter traits for subroutines
-L<S06/"Parameter traits">
-
=end description
+# L<S06/"Parameter traits">
+
my $foo=1;
# note: many of these errors can be detected at compile time, so need
View
4 S06-traits/precedence.t
@@ -6,10 +6,10 @@ use Test;
Tests for precedence of self defined operators
-L<S06/Subroutine traits/"relative to an existing">
-
=end pod
+# L<S06/Subroutine traits/"relative to an existing">
+
plan 10;
do {
View
5 S12-class/declaration-order.t
@@ -7,11 +7,14 @@ plan 2;
=begin pod
-L<S12/Classes/"bare class names must be predeclared">
A class can only derive already declared classes.
=end pod
+# L<S12/Classes/"bare class names must be predeclared">
+
# need eval_lives_ok here because class declarations happen at compile time
eval_lives_ok ' class A {}; class B is A {}; ', "base before derived: lives";
eval_dies_ok ' class D is C {}; class C {}; ', "derived before base: dies";
+
+# vim: ft=perl6
View
9 S12-construction/autopairs.t
@@ -4,14 +4,9 @@ use Test;
plan 4;
-=begin pod
-Autopair tests with class instantiation from
-L<S02/"Literals"/"There is now a generalized adverbial form">
+#L<S02/"Literals"/"There is now a generalized adverbial form">
-=end pod
-
-# L<S02/"Literals"/"There is now a generalized adverbial form">
{
eval_lives_ok('my $a; class Ta { has $.a }; my Ta $c .= new(:$a)',
'class instantiation with autopair, no spaces');
@@ -22,3 +17,5 @@ L<S02/"Literals"/"There is now a generalized adverbial form">
eval_lives_ok('my $a; role Td { has $.a }; my Td $c .= new(:$a )',
'role instantiation with autopair, spaces');
}
+
+# vim: ft=perl6
View
1 S12-construction/named-params-in-BUILD.t
@@ -3,6 +3,7 @@ use v6;
use Test;
plan 3;
+# L<S12/Construction and Initialization/The default BUILD and BUILDALL>
class Foo {
has $.v;
View
10 S12-methods/indirect_notation.t
@@ -2,15 +2,7 @@ use v6;
use Test;
-=begin description
-
-=head1 indirect object notation call tests
-
-These tests are the testing for "Method" section of Synopsis 12
-
-L<S12/Methods/"Indirect object notation now requires a colon after the invocant, even if there are no arguments">
-
-=end description
+# L<S12/Methods/"Indirect object notation now requires a colon after the invocant, even if there are no arguments">
plan 29;
View
4 S12-subset/subtypes.t
@@ -8,10 +8,10 @@ plan 50;
Tests subtypes, specifically in the context of multimethod dispatch.
-L<S12/"Types and Subtypes">
-
=end description
+# L<S12/"Types and Subtypes">
+
my $abs = '
multi sub my_abs (Num $n where { $^n >= 0 }){ $n }
multi sub my_abs (Num $n where { $^n < 0 }){ -$n }
View
7 S32-list/minmax.t
@@ -9,13 +9,6 @@ plan 34;
=begin description
-This test tests the C<min> and C<max> builtins.
-
-Reference:
-L<"http://groups.google.com/groups?selm=420DB295.3000902%40conway.org">
-L<S32::Containers/"List"/"=item min">
-L<S32::Containers/"List"/"=item max">
-
As per S32, the sub form requires a comparison function. The form without
comparison function is spelled [min]

0 comments on commit eda6db1

Please sign in to comment.
Something went wrong with that request. Please try again.