Permalink
Browse files

fix all the remaining S02/Literals smartlinks I broke by adding headi…

…ngs.
  • Loading branch information...
diakopter committed Aug 23, 2011
1 parent e49dcab commit 75bf7cbc65bc93c58fe3e20b99ba623dd73170f9
@@ -8,8 +8,7 @@ is +(5, 7, 8), 3, 'prefix:<+> on a Parcel';
is ~(5, 7, 8), '5 7 8', 'prefix:<~> on a Parcel';
is (5, 7, 8).Str, '5 7 8', '.Str on a Parcel';
-# L<S02/Literals/Elsewhere it is equivalent to a parenthesized list of
-# strings>
+# L<S02/Quoting forms/Elsewhere it is equivalent to a parenthesized list of strings>
isa_ok <5 7 8>, Parcel, '<5 7 8> is Parcel';
is +<5 7 8>, 3, 'prefix:<+> on an angle bracket Parcel';
@@ -12,7 +12,7 @@ These tests exercise a bug found at least in r16241 of Pugs
plan 11;
-# L<S02/Literals/Bare scalar variables>
+# L<S02/Interpolation rules/Bare scalar variables>
my $x = 'A';
my $y;
@@ -17,7 +17,7 @@ plan 10;
}
{
- # L<S02/Literals/In order to interpolate an entire hash>
+ # L<S02/Arrays/In order to interpolate an entire hash>
my %hash = { a=> 1, b => 2 };
#?rakudo 2 skip 'zen hash slice'
#?niecza 2 skip 'zen hash slice'
View
@@ -3,7 +3,7 @@ use Test;
plan 4;
-#L<S02/Literals/"Characters indexed by hex numbers">
+#L<S02/Radix interpolation/"Characters indexed by hex numbers">
{
my %unicode = (
'a' => "\x61",
View
@@ -61,12 +61,12 @@ is($p, ~('foo' => (1,2,3)), ':foo<1 2 3> is pair of list');
is(%foo<blah>, %e<blah>, "Hashes with embedded newlines in the list (3)");
}
-# L<S02/Literals/"The degenerate case <> is disallowed">
+# L<S02/Forcing item context/"The degenerate case <> is disallowed">
eval_dies_ok '<>', 'bare <> is disallowed';
eval_dies_ok '<STDIN>', '<STDIN> is disallowed';
-# L<S02/Literals/"is autopromoted into">
+# L<S02/Quoting forms/"is autopromoted into">
#?rakudo skip 'List to Capture auto-promotion'
{
my $c = <a b c>;
@@ -76,7 +76,7 @@ eval_dies_ok '<STDIN>', '<STDIN> is disallowed';
#?rakudo skip 'magic type of <...> contents'
{
- # L<S02/Literals/For any item in the list that appears to be numeric>
+ # L<S02/Forcing item context/For any item in the list that appears to be numeric>
my @a = <foo 3 4.5 5.60 1.2e1>;
is ~@a, 'foo 3 4.5 5.60 1.2e1',
'<...> numeric literals stringify correctly';
@@ -43,7 +43,7 @@ is("$number {my $number=2} $number", '1 2 1', 'original number still available a
is("&func. () is where I live", '&func. () is where I live', '"&func. ()" should not interpolate');
is("&func_w_args("foo","bar"))", '[foo][bar])', '"&func_w_args(...)" should interpolate');
-# L<S02/Literals/"In order to interpolate the result of a method call">
+# L<S02/Method calls/"In order to interpolate the result of a method call">
is("$world.chars()", '5', 'method calls with parens should interpolate');
is("$world.chars", 'World.chars', 'method calls without parens should not interpolate');
is("$world.flip.chars()", '5', 'cascade of argumentless methods, last ending in paren');
@@ -75,7 +75,7 @@ is('$world \qq[@list[]] %hash{}', '$world 1 2 %hash{}', "interpolate quoting con
is(" \c[111] \c[107] ", ' o k ', "\\c[] respects whitespaces around it");
-# L<S02/Literals/separating the numbers with comma:>
+# L<S02/Radix interpolation/separating the numbers with comma:>
is("x \x[41,42,43] x", "x ABC x", "\\x[] allows multiple chars (1)");
is("x \x[41,42,00043] x", "x ABC x", "\\x[] allows multiple chars (2)"); #OK not indicate octal
is("x \x[ 41, 42, 43 ] x", "x ABC x", "\\x[] allows multiple chars with white space");
View
@@ -11,7 +11,7 @@ isa_ok 1.Num, Num, '1.Num produces a Int';
ok 1.Num ~~ Numeric, '1.Num is Numeric';
ok 1.Num ~~ Real, '1.Num is Real';
-# L<S02/Literals/Rational literals are indicated>
+# L<S02/Rational literals/Rational literals are indicated>
is_approx 1/2, 0.5, '1/2 Rat literal';
isa_ok 1/2, Rat, '1/2 produces a Rat';
@@ -21,7 +21,7 @@ isa_ok 0x01/0x02, Rat, 'same with hexadecimal numbers';
ok 0x01/0x02 / (0x01/0x02) == 1, 'same with hexadecimal numbers';
-# L<S02/Literals/Complex literals are similarly indicated>
+# L<S02/Complex literals/Complex literals are similarly indicated>
isa_ok 1+1i, Complex, '1+1i is a Complex literal';
ok 1+1i ~~ Numeric, '1+1i is Numeric';
View
@@ -2,7 +2,7 @@ use v6;
use Test;
-# L<S02/Literals/"There is now a generalized adverbial form of Pair">
+# L<S02/Adverbial Pair forms/"There is now a generalized adverbial form of Pair">
# See thread "Demagicalizing pair" on p6l started by Luke Palmer,
# L<"http://article.gmane.org/gmane.comp.lang.perl.perl6.language/4778/"> and
View
@@ -6,23 +6,23 @@ plan 5;
# See "=begin DATA" at the end of file.
-# L<S02/Literals/filehandle "named as" %=POD{'DATA'}>
+# L<S02/Double-underscore forms/filehandle, "named as" %=POD{'DATA'}>
{
ok %=POD{'DATA'}, '=begin DATA works and %=POD<DATA> defined';
my $line = get %=POD<DATA>;
is($line, "hello, world!", q/%=POD{'DATA'} can be read/);
}
-# L<S02/Literals/"pod stream" "as a scalar" via $=DATA>
+# L<S02/Double-underscore forms/Pod stream as a scalar>
{
# XXX isn't the iterator exhausted already, since it's been used
# previously?
my $line = get $=DATA;
is($line, "hello, world!", q/$=DATA contains the right string/);
}
-# L<S02/Literals/"pod stream" "as an array" via @=DATA>
+# L<S02/Double-underscore forms/"Pod stream" "as an array" via @=DATA>
{
is @=DATA.elems, 1, '@=DATA contains a single elem';
is @=DATA[0], "hello, world!\n", '@=DATA[0] contains the right value';
View
@@ -54,7 +54,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
ok Q{\\}.chars == 2, 'Q{..} do not interpolate backslashes';
}
-# L<S02/Literals/":q" ":single" "Interpolate \\, \q and \'">
+# L<S02/Adverbs on quotes/":q" ":single" "Interpolate \\, \q and \'">
{
my @q = ();
@q = (q/$foo $bar/);
@@ -69,7 +69,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
is(@q[0], '$foo $bar', 'and did not interpolate either');
};
-# L<S02/Literals/That is () have no special significance>
+# L<S02/Delimiters of quoting forms/That is () have no special significance>
# non interpolating single quotes with nested parens
{
my @q = ();
@@ -78,7 +78,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
is(@q[0], '$foo $bar', 'and nests parens appropriately');
};
-# L<S02/Literals/That is () have no special significance>
+# L<S02/Delimiters of quoting forms/That is () have no special significance>
#?rakudo skip 'quoting with q (..)'
{ # non interpolating single quotes with nested parens
my @q = ();
@@ -87,7 +87,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
is(@q[0], ' ($foo $bar)', 'and nests parens appropriately');
};
-# L<S02/Literals/Which is mandatory for parens>
+# L<S02/Delimiters of quoting forms/Which is mandatory for parens>
{ # q() is bad
my @q;
sub q { @_ }
@@ -96,7 +96,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
is(+@q, 2, 'q() is always sub call');
};
-# L<S02/Literals/:q>
+# L<S02/C<Q> forms/:q>
#?rakudo skip 'Q:q adverbs'
{ # adverb variation
my @q = ();
@@ -120,7 +120,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
is(@q[0], '$foo $bar', 'and nests brackets appropriately');
};
-# L<S02/Literals/qq:>
+# L<S02/C<Q> forms/qq:>
{ # interpolating quotes
my @q = ();
@q = qq/$foo $bar/;
@@ -135,7 +135,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
is(@q[0], "FOO BAR", '"" interpolates');
};
-# L<S02/Literals/:qq>
+# L<S02/C<Q> forms/:qq>
#?rakudo skip 'Q:qq adverbs'
{ # adverb variation
my @q = ();
@@ -144,7 +144,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
is(@q[0], "FOO BAR", "blah blah interp");
};
-# L<S02/Literals/using the \qq>
+# L<S02/Interpolating into a single-quoted string/using the \qq>
#?rakudo skip 'q[..] with variations'
#?niecza skip 'backslash q'
{ # \qq[] constructs interpolate in q[]
@@ -181,7 +181,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
is(@q[1], '$bar', "...");
};
-# L<S02/Literals/quote operator now has a bracketed form>
+# L<S02/Quoting forms/quote operator now has a bracketed form>
{ # angle brackets
my @q = ();
@q = <$foo $bar>;
@@ -209,7 +209,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
#?rakudo skip 'q:w'
{ # whitespace sep aration does not break quote constructor
- # L<S02/Literals/Whitespace is allowed between the "q" and its adverb: q :w /.../.>
+ # L<S02/Whitespace before adverbs/Whitespace is allowed between the "q" and its adverb: q :w /.../.>
my @q = ();
@q = (q :w /$foo $bar/);
is(+@q, 2, "q :w // is the same as q:w//");
@@ -220,7 +220,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
#?rakudo skip 'quoting with adverbs'
{ # qq:w,Interpolating quote constructor with words adverb
- # L<S02/Literals/"Split result on words (no quote protection)">
+ # L<S02/Adverbs on quotes/"Split result on words (no quote protection)">
my (@q1, @q2) = ();
@q1 = qq:w/$foo "gorch $bar"/;
@q2 = qq:words/$foo "gorch $bar"/;
@@ -234,7 +234,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
#?rakudo skip 'quoting with adverbs'
{ # qq:ww, interpolating L<S02/Literals/double angles do interpolate>
- # L<S02/Literals/"implicit split" "shell-like fashion">
+ # L<S02/Forcing item context/"implicit split" "shell-like fashion">
my (@q1, @q2, @q3, @q4) = ();
@q1 = qq:ww/$foo "gorch $bar"/;
@q2 = «$foo "gorch $bar"»; # french
@@ -249,7 +249,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
is(~@q1, 'FOO gorch BAR', "explicit quote word interpolates");
is(~@q2, 'FOO gorch BAR', "output is the same as french");
- # L<S02/Literals/"the built-in «...» quoter automatically does interpolation equivalent to qq:ww/.../">
+ # L<S02/Adverbs on quotes/"the built-in «...» quoter automatically does interpolation equivalent to qq:ww/.../">
is(~@q3, 'FOO gorch BAR', ", texas quotes");
is(~@q4, 'FOO gorch BAR', ", and long form");
};
@@ -263,14 +263,14 @@ Note that non-ASCII tests are kept in quoting-unicode.t
#?rakudo skip '«...»'
{
- #L<S02/Literals/"relationship" "single quotes" "double angles">
+ #L<S02/Forcing item context/"relationship" "single quotes" "double angles">
# Pugs was having trouble with this. Fixed in r12785.
my ($x, $y) = <a b>;
ok(«$x $y» === <a b>, "«$x $y» interpolation works correctly");
};
-# L<S02/Literals/respects quotes in a shell-like fashion>
+# L<S02/Forcing item context/respects quotes in a shell-like fashion>
#?rakudo skip '«...»'
{ # qw, interpolating, shell quoting
my (@q1, @q2) = ();
@@ -287,7 +287,7 @@ Note that non-ASCII tests are kept in quoting-unicode.t
is(@q2[2], '$bar', 'single quoted $bar was not interpolated');
};
-# L<S02/Literals/Heredocs are no longer written>
+# L<S02/Heredocs/Heredocs are no longer written>
#?rakudo skip 'quoting with adverbs'
{ # qq:to
my @q = ();
@@ -303,7 +303,7 @@ FOO
is(@q[0], "blah\nBAR\nblah\nFOO\n", "here doc interpolated");
};
-# L<S02/Literals/Heredocs allow optional whitespace>
+# L<S02/Optional whitespace/Heredocs allow optional whitespace>
#?rakudo skip 'quoting with adverbs'
{ # q:to indented
my @q = ();
@@ -337,7 +337,7 @@ FOO
is(@q[0], "foo\\\\bar\$foo", "special chars are meaningless"); # double quoting is to be more explicit
};
-# L<S02/Literals/"Pair" notation is also recognized inside>
+# L<S02/Forcing item context/"Pair" notation is also recognized inside>
{
# <<:Pair>>
my @q = <<:p(1)>>;
@@ -384,7 +384,7 @@ FOO
#?rakudo skip 'Thinks statement not terminated properly'
is( q<< <<woot>> >>, ' <<woot>> ', 'nested <<texas>> quotes (RT #66888)' );
-# L<S02/Literals/"for user-defined quotes">
+# L<S02/Adverbs on quotes/"for user-defined quotes">
# q:to
#?rakudo skip 'quoting with adverbs'
{
@@ -464,7 +464,7 @@ Hello, World
}
-# L<S02/Literals/"Interpolate % vars">
+# L<S02/Adverbs on quotes/"Interpolate % vars">
# q:h
#?rakudo skip 'quoting adverbs'
{
@@ -548,7 +548,7 @@ Hello, World
is(Qc[{1+1}], 2, 'Qc');
}
-# L<S02/Literals/All other quoting forms (including standard single quotes)>
+# L<S02/Backslashing/All other quoting forms (including standard single quotes)>
{
is('test\\', "test\\", "backslashes at end of single quoted string");
is 'a\\b\''.chars, 4, 'backslash and single quote';
Oops, something went wrong.

0 comments on commit 75bf7cb

Please sign in to comment.