Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Remove tests from t/pod, as they now live in roast, also remove podte…

…st Makefile target. Run S26 tests
  • Loading branch information...
commit 59c1c35d93ca58d93bcaa3b3d78455a05a534401 1 parent 48af8ca
Tadeusz Sośnierz tadzik authored
160 t/pod/01-delimited.t
... ... @@ -1,160 +0,0 @@
1   -use Test;
2   -plan 39;
3   -my $r;
4   -
5   -=begin foo
6   -=end foo
7   -
8   -$r = $=POD[0];
9   -isa_ok $r, Pod::Block, 'returns a Pod Block';
10   -isa_ok $r, Pod::Block::Named, 'returns a named Block';
11   -is $r.name, 'foo', 'name is ok';
12   -is $r.content, [], 'no content, all right';
13   -
14   -=begin foo
15   -some text
16   -=end foo
17   -
18   -$r = $=POD[1];
19   -isa_ok $r.content[0], Pod::Block::Para;
20   -is $r.content[0].content, "some text", 'the content is all right';
21   -is $r.name, 'foo', 'name is ok';
22   -
23   -=begin foo
24   -some
25   -spaced text
26   -=end foo
27   -
28   -$r = $=POD[2];
29   -is $r.name, 'foo', 'name is ok';
30   -is $r.content[0].content,
31   - "some spaced text", 'additional whitespace removed from the content';
32   -
33   -=begin foo
34   -paragraph one
35   -
36   -paragraph
37   -two
38   -=end foo
39   -$r = $=POD[3];
40   -is $r.name, 'foo', 'name is ok';
41   -isa_ok $r.content[0], Pod::Block::Para;
42   -isa_ok $r.content[1], Pod::Block::Para;
43   -is $r.content[0].content, "paragraph one", 'paragraphs ok, 1/2';
44   -is $r.content[1].content, "paragraph two", 'paragraphs ok, 2/2';
45   -
46   -=begin something
47   - =begin somethingelse
48   - toot tooot!
49   - =end somethingelse
50   -=end something
51   -
52   -$r = $=POD[4];
53   -is $r.name, 'something', 'parent name ok';
54   -isa_ok $r.content[0], Pod::Block, "nested blocks work";
55   -isa_ok $r.content[0].content[0], Pod::Block::Para, "nested blocks work";
56   -is $r.content[0].content[0].content, "toot tooot!", "and their content";
57   -is $r.content[0].name, 'somethingelse', 'child name ok';
58   -
59   -# Albi
60   -=begin foo
61   -and so, all of the villages chased
62   -Albi, The Racist Dragon, into the
63   -very cold and very scary cave
64   -
65   -and it was so cold and so scary in
66   -there, that Albi began to cry
67   -
68   - =begin bar
69   - Dragon Tears!
70   - =end bar
71   -
72   -Which, as we all know...
73   -
74   - =begin bar
75   - Turn into Jelly Beans!
76   - =end bar
77   -=end foo
78   -
79   -$r = $=POD[5];
80   -isa_ok $r, Pod::Block;
81   -is $r.content.elems, 5, '5 sub-nodes in foo';
82   -is $r.content[0].content,
83   - 'and so, all of the villages chased Albi, The Racist Dragon, ' ~
84   - 'into the very cold and very scary cave',
85   - '...in the marmelade forest';
86   -is $r.content[1].content,
87   - 'and it was so cold and so scary in there, that Albi began to cry',
88   - '...between the make-believe trees';
89   -is $r.content[2].content[0].content, "Dragon Tears!",
90   - '...in a cottage cheese cottage';
91   -is $r.content[3].content, "Which, as we all know...",
92   - '...lives Albi! Albi!';
93   -is $r.content[4].content[0].content, "Turn into Jelly Beans!",
94   - '...Albi, the Racist Dragon';
95   -
96   -=begin pod
97   -
98   -someone accidentally left a space
99   -
100   -between these two paragraphs
101   -
102   -=end pod
103   -
104   -$r = $=POD[6];
105   -isa_ok $r, Pod::Block;
106   -is $r.content[0].content, 'someone accidentally left a space',
107   - 'accidental space, 1/2';
108   -is $r.content[1].content, 'between these two paragraphs',
109   - 'accidental space, 2/2';
110   -
111   -# various things which caused the spectest to fail at some point
112   -=begin kwid
113   -
114   -= DESCRIPTION
115   -bla bla
116   -
117   -foo
118   -=end kwid
119   -
120   -$r = $=POD[7];
121   -is $r.content[0].content, '= DESCRIPTION bla bla';
122   -isa_ok $r.content[1], Pod::Block::Para;
123   -is $r.content[1].content, 'foo';
124   -
125   -=begin more-discussion-needed
126   -
127   -XXX: chop(@array) should return an array of chopped strings?
128   -XXX: chop(%has) should return a hash of chopped strings?
129   -
130   -=end more-discussion-needed
131   -
132   -$r = $=POD[8];
133   -isa_ok $r, Pod::Block;
134   -
135   -=begin pod
136   - =head1 This is a heading block
137   -
138   - This is an ordinary paragraph.
139   - Its text will be squeezed and
140   - short lines filled. It is terminated by
141   - the first blank line.
142   -
143   - This is another ordinary paragraph.
144   - Its text will also be squeezed and
145   - short lines filled. It is terminated by
146   - the trailing directive on the next line.
147   - =head2 This is another heading block
148   -
149   - This is yet another ordinary paragraph,
150   - at the first virtual column set by the
151   - previous directive
152   -=end pod
153   -
154   -$r = $=POD[9];
155   -isa_ok $r.content[0], Pod::Heading;
156   -isa_ok $r.content[1], Pod::Block::Para;
157   -isa_ok $r.content[2], Pod::Block::Para;
158   -isa_ok $r.content[3], Pod::Heading;
159   -isa_ok $r.content[4], Pod::Block::Para;
160   -is $r.content.elems, 5;
112 t/pod/02-paragraph.t
... ... @@ -1,112 +0,0 @@
1   -use Test;
2   -plan 27;
3   -my $r;
4   -
5   -=for foo
6   -
7   -$r = $=POD[0];
8   -isa_ok $r, Pod::Block, 'returns a Pod6 Block';
9   -isa_ok $r, Pod::Block::Named, 'returns a named Block';
10   -is $r.name, 'foo', 'name is ok';
11   -is $r.content, [], 'no content, all right';
12   -
13   -=for foo
14   -some text
15   -
16   -$r = $=POD[1];
17   -isa_ok $r.content[0], Pod::Block::Para;
18   -is $r.content[0].content, "some text", 'the content is all right';
19   -
20   -=for foo
21   -some
22   -spaced text
23   -
24   -$r = $=POD[2];
25   -is $r.content[0].content,
26   - "some spaced text", 'additional whitespace removed from the content';
27   -=begin pod
28   -
29   -=for got
30   -Inside got
31   -
32   - =for bidden
33   - Inside bidden
34   -
35   -Outside blocks
36   -=end pod
37   -
38   -$r = $=POD[3];
39   -isa_ok $r.content[0], Pod::Block;
40   -is $r.content[0].content[0].content, "Inside got",
41   - 'paragraph block content ok, 1/2';
42   -isa_ok $r.content[1], Pod::Block;
43   -is $r.content[1].content[0].content, "Inside bidden",
44   - 'paragraph block content ok, 1/2';
45   -isa_ok $r.content[2], Pod::Block::Para;
46   -is $r.content[2].content, "Outside blocks",
47   - 'content outside blocks is all right';
48   -
49   -# mixed blocks
50   -=begin pod
51   -=begin one
52   -one, delimited block
53   -=end one
54   -=for two
55   -two, paragraph block
56   -=for three
57   -three, still a parablock
58   -
59   -=begin four
60   -four, another delimited one
61   -=end four
62   -=end pod
63   -
64   -$r = $=POD[4];
65   -is $r.content[0].content[0].content,
66   - "one, delimited block", "mixed blocks, 1";
67   -is $r.content[1].content[0].content,
68   - "two, paragraph block", "mixed blocks, 2";
69   -is $r.content[2].content[0].content,
70   - "three, still a parablock", "mixed blocks, 3";
71   -is $r.content[3].content[0].content,
72   - "four, another delimited one", "mixed blocks, 4";
73   -
74   -# tests without Albi would still be tests, but definitely very, very sad
75   -# also, Albi without paragraph blocks wouldn't be the happiest dragon
76   -# either
77   -=begin foo
78   -and so, all of the villages chased
79   -Albi, The Racist Dragon, into the
80   -very cold and very scary cave
81   -
82   -and it was so cold and so scary in
83   -there, that Albi began to cry
84   -
85   - =for bar
86   - Dragon Tears!
87   -
88   -Which, as we all know...
89   -
90   - =for bar
91   - Turn into Jelly Beans!
92   -=end foo
93   -
94   -$r = $=POD[5];
95   -isa_ok $r, Pod::Block;
96   -is $r.content.elems, 5, '5 sub-nodes in foo';
97   -is $r.name, 'foo';
98   -is $r.content[0].content,
99   - 'and so, all of the villages chased Albi, The Racist Dragon, ' ~
100   - 'into the very cold and very scary cave',
101   - '...in the marmelade forest';
102   -is $r.content[1].content,
103   - 'and it was so cold and so scary in there, that Albi began to cry',
104   - '...between the make-believe trees';
105   -is $r.content[2].name, 'bar';
106   -is $r.content[2].content[0].content, "Dragon Tears!",
107   - '...in a cottage cheese cottage';
108   -is $r.content[3].content, "Which, as we all know...",
109   - '...lives Albi! Albi!';
110   -is $r.content[4].name, 'bar';
111   -is $r.content[4].content[0].content, "Turn into Jelly Beans!",
112   - '...Albi, the Racist Dragon';
128 t/pod/03-abbreviated.t
... ... @@ -1,128 +0,0 @@
1   -use Test;
2   -plan 30;
3   -my $r;
4   -
5   -=foo
6   -
7   -$r = $=POD[0];
8   -isa_ok $r, Pod::Block, 'returns a Pod6 Block';
9   -isa_ok $r, Pod::Block::Named, 'returns a named Block';
10   -is $r.content, [], 'no content, all right';
11   -
12   -=foo some text
13   -
14   -$r = $=POD[1];
15   -is $r.content[0].content, "some text", 'the content is all right';
16   -
17   -=foo some text
18   -and some more
19   -
20   -$r = $=POD[2];
21   -is $r.content[0].content, "some text and some more", 'the content is all right';
22   -
23   -=begin pod
24   -
25   -=got Inside
26   -got
27   -
28   -=bidden Inside
29   -bidden
30   -
31   -Outside blocks
32   -=end pod
33   -
34   -$r = $=POD[3];
35   -isa_ok $r.content[0], Pod::Block;
36   -is $r.content[0].content[0].content, "Inside got",
37   - 'paragraph block content ok, 1/2';
38   -isa_ok $r.content[1], Pod::Block;
39   -is $r.content[1].content[0].content, "Inside bidden",
40   - 'paragraph block content ok, 1/2';
41   -isa_ok $r.content[2], Pod::Block::Para;
42   -is $r.content[2].content, "Outside blocks",
43   - 'content outside blocks is all right';
44   -
45   -# mixed blocks
46   -=begin pod
47   - =begin one
48   - one, delimited block
49   - =end one
50   - =two two,
51   - paragraph block
52   - =for three
53   - three, still a parablock
54   -
55   - =begin four
56   - four, another delimited one
57   - =end four
58   - =head1 And just for the sake of having a working =head1 :)
59   -=end pod
60   -
61   -$r = $=POD[4];
62   -is $r.content[0].content[0].content,
63   - "one, delimited block", "mixed blocks, 1";
64   -is $r.content[1].content[0].content,
65   - "two, paragraph block", "mixed blocks, 2";
66   -is $r.content[2].content[0].content,
67   - "three, still a parablock", "mixed blocks, 3";
68   -is $r.content[3].content[0].content,
69   - "four, another delimited one", "mixed blocks, 4";
70   -is $r.content[4].content[0].content,
71   - "And just for the sake of having a working =head1 :)", 'mixed blocks, 5';
72   -
73   -=begin foo
74   -and so, all of the villages chased
75   -Albi, The Racist Dragon, into the
76   -very cold and very scary cave
77   -
78   -and it was so cold and so scary in
79   -there, that Albi began to cry
80   -
81   - =bold Dragon Tears!
82   -
83   -Which, as we all know...
84   -
85   - =bold Turn
86   - into
87   - Jelly
88   - Beans!
89   -=end foo
90   -
91   -$r = $=POD[5];
92   -isa_ok $r, Pod::Block;
93   -is $r.content.elems, 5, '5 sub-nodes in foo';
94   -is $r.content[0].content,
95   - 'and so, all of the villages chased Albi, The Racist Dragon, ' ~
96   - 'into the very cold and very scary cave',
97   - '...in the marmelade forest';
98   -is $r.content[1].content,
99   - 'and it was so cold and so scary in there, that Albi began to cry',
100   - '...between the make-believe trees';
101   -is $r.content[2].content[0].content, "Dragon Tears!",
102   - '...in a cottage cheese cottage';
103   -is $r.content[3].content, "Which, as we all know...",
104   - '...lives Albi! Albi!';
105   -is $r.content[4].content[0].content, "Turn into Jelly Beans!",
106   - '...Albi, the Racist Dragon';
107   -
108   -# from S26
109   -=table_not
110   - Constants 1
111   - Variables 10
112   - Subroutines 33
113   - Everything else 57
114   -
115   -$r = $=POD[6];
116   -isa_ok $r, Pod::Block;
117   -is $r.content.elems, 1;
118   -is $r.content[0].content,
119   - 'Constants 1 Variables 10 Subroutines 33 Everything else 57';
120   -
121   -=head3
122   -Heading level 3
123   -
124   -$r = $=POD[7];
125   -isa_ok $r, Pod::Block;
126   -isa_ok $r, Pod::Heading;
127   -is $r.level, '3';
128   -is $r.content[0].content, 'Heading level 3';
157 t/pod/04-code.t
... ... @@ -1,157 +0,0 @@
1   -use Test;
2   -plan 50;
3   -my $r;
4   -
5   -=begin pod
6   -This ordinary paragraph introduces a code block:
7   -
8   - $this = 1 * code('block');
9   - $which.is_specified(:by<indenting>);
10   -=end pod
11   -
12   -$r = $=POD[0];
13   -is $r.content[0].content, 'This ordinary paragraph introduces a code block:';
14   -isa_ok $r.content[1], Pod::Block::Code;
15   -is $r.content[1].content.Str, q[$this = 1 * code('block');
16   -$which.is_specified(:by<indenting>);];
17   -
18   -# more fancy code blocks
19   -=begin pod
20   -This is an ordinary paragraph
21   -
22   - While this is not
23   - This is a code block
24   -
25   - =head1 Mumble mumble
26   -
27   - Suprisingly, this is not a code block
28   - (with fancy indentation too)
29   -
30   -But this is just a text. Again
31   -
32   -=end pod
33   -
34   -$r = $=POD[1];
35   -is $r.content.elems, 5;
36   -is $r.content[0].content, 'This is an ordinary paragraph';
37   -isa_ok $r.content[1], Pod::Block::Code;
38   -is $r.content[1].content, "While this is not\nThis is a code block";
39   -isa_ok $r.content[2], Pod::Block;
40   -is $r.content[2].content[0].content, 'Mumble mumble';
41   -isa_ok $r.content[3], Pod::Block::Para;
42   -is $r.content[3].content, "Suprisingly, this is not a code block"
43   - ~ " (with fancy indentation too)";
44   -is $r.content[4].content, "But this is just a text. Again";
45   -
46   -=begin pod
47   -
48   -Tests for the feed operators
49   -
50   - ==> and <==
51   -
52   -=end pod
53   -
54   -$r = $=POD[2];
55   -is $r.content[0].content, 'Tests for the feed operators';
56   -isa_ok $r.content[1], Pod::Block::Code;
57   -is $r.content[1].content, "==> and <==";
58   -
59   -=begin pod
60   -Fun comes
61   -
62   - This is code
63   - Ha, what now?
64   -
65   - one more block of code
66   - just to make sure it works
67   - or better: maybe it'll break!
68   -=end pod
69   -
70   -$r = $=POD[3];
71   -is $r.content.elems, 4;
72   -is $r.content[0].content, 'Fun comes';
73   -isa_ok $r.content[1], Pod::Block::Code;
74   -is $r.content[1].content, 'This is code';
75   -isa_ok $r.content[2], Pod::Block::Code;
76   -is $r.content[2].content, 'Ha, what now?';
77   -isa_ok $r.content[3], Pod::Block::Code;
78   -is $r.content[3].content, "one more block of code\n"
79   - ~ "just to make sure it works\n"
80   - ~ " or better: maybe it'll break!";
81   -
82   -=begin pod
83   -
84   -=head1 A heading
85   -
86   -This is Pod too. Specifically, this is a simple C<para> block
87   -
88   - $this = pod('also'); # Specifically, a code block
89   -
90   -=end pod
91   -
92   -$r = $=POD[4];
93   -is $r.content.elems, 3;
94   -isa_ok $r.content[0], Pod::Block;
95   -is $r.content[0].content[0].content, 'A heading';
96   -is $r.content[1].content[0],
97   - 'This is Pod too. Specifically, this is a simple ';
98   -isa_ok $r.content[1].content[1], Pod::FormattingCode;
99   -is $r.content[1].content[1].type, 'C';
100   -is $r.content[1].content[1].content, 'para';
101   -is $r.content[1].content[2], ' block';
102   -isa_ok $r.content[2], Pod::Block::Code;
103   -is $r.content[2].content,
104   - q[$this = pod('also'); # Specifically, a code block];
105   -
106   -=begin pod
107   - this is code
108   -
109   - =for podcast
110   - this is not
111   -
112   - this is not code either
113   -
114   - =begin itemization
115   - this is not
116   - =end itemization
117   -
118   - =begin quitem
119   - and this is not
120   - =end quitem
121   -
122   - =begin item
123   - and this is!
124   - =end item
125   -=end pod
126   -
127   -$r = $=POD[5];
128   -is $r.content.elems, 6;
129   -isa_ok $r.content[0], Pod::Block::Code;
130   -is $r.content[0].content, 'this is code';
131   -
132   -isa_ok $r.content[1], Pod::Block::Named;
133   -is $r.content[1].name, 'podcast';
134   -is $r.content[1].content[0].content, 'this is not';
135   -
136   -isa_ok $r.content[2], Pod::Block::Para;
137   -is $r.content[2].content, 'this is not code either';
138   -
139   -isa_ok $r.content[3], Pod::Block::Named;
140   -is $r.content[3].name, 'itemization';
141   -is $r.content[3].content[0].content, 'this is not';
142   -
143   -isa_ok $r.content[4], Pod::Block::Named;
144   -is $r.content[4].name, 'quitem';
145   -is $r.content[4].content[0].content, 'and this is not';
146   -
147   -isa_ok $r.content[5].content[0], Pod::Block::Code;
148   -is $r.content[5].content[0].content, 'and this is!';
149   -
150   -=begin code
151   - foo foo
152   - =begin code
153   - =end code
154   -=end code
155   -
156   -$r = $=POD[6];
157   -isa_ok $r, Pod::Block::Code;
41 t/pod/05-comment.t
... ... @@ -1,41 +0,0 @@
1   -use Test;
2   -plan 9;
3   -my $r;
4   -
5   -=begin pod
6   -=for comment
7   -foo foo
8   -bla bla bla
9   -
10   -This isn't a comment
11   -=end pod
12   -
13   -$r = $=POD[0];
14   -isa_ok $r.content[0], Pod::Block::Comment;
15   -is $r.content[0].content.elems, 1;
16   -is $r.content[0].content, "foo foo\nbla bla bla\n";
17   -
18   -# from S26
19   -=comment
20   -This file is deliberately specified in Perl 6 Pod format
21   -
22   -$r = $=POD[1];
23   -isa_ok $r, Pod::Block::Comment;
24   -is $r.content.elems, 1;
25   -is $r.content[0],
26   - "This file is deliberately specified in Perl 6 Pod format\n";
27   -
28   -# this happens to break hilighting in some editors,
29   -# so I put it at the end
30   -=begin comment
31   -foo foo
32   -=begin invalid pod
33   -=as many invalid pod as we want
34   -===yay!
35   -=end comment
36   -
37   -$r = $=POD[2];
38   -isa_ok $r, Pod::Block;
39   -is $r.content.elems, 1;
40   -is $r.content[0], "foo foo\n=begin invalid pod\n"
41   - ~ "=as many invalid pod as we want\n===yay!\n";
104 t/pod/06-lists.t
... ... @@ -1,104 +0,0 @@
1   -use Test;
2   -plan 31;
3   -my $r;
4   -
5   -=begin pod
6   -The seven suspects are:
7   -
8   -=item Happy
9   -=item Dopey
10   -=item Sleepy
11   -=item Bashful
12   -=item Sneezy
13   -=item Grumpy
14   -=item Keyser Soze
15   -=end pod
16   -
17   -$r = $=POD[0];
18   -is $r.content.elems, 8;
19   -for 1..7 {
20   - isa_ok $r.content[$_], Pod::Item;
21   -}
22   -
23   -is $r.content[1].content[0].content, 'Happy', 'content is happy :)';
24   -is $r.content[2].content[0].content, 'Dopey';
25   -is $r.content[7].content[0].content, 'Keyser Soze';
26   -nok $r.content[4].level.defined, 'no level information';
27   -
28   -=begin pod
29   -=item1 Animal
30   -=item2 Vertebrate
31   -=item2 Invertebrate
32   -
33   -=item1 Phase
34   -=item2 Solid
35   -=item2 Liquid
36   -=item2 Gas
37   -=item2 Chocolate
38   -=end pod
39   -
40   -$r = $=POD[1];
41   -is $r.content.elems, 8;
42   -for 0..7 {
43   - isa_ok $r.content[$_], Pod::Item;
44   -}
45   -
46   -$r.content[0].content[0].content, 'Animal';
47   -$r.content[0].level, 1;
48   -$r.content[2].content[0].content, 'Invertebrate';
49   -$r.content[2].level, 2;
50   -$r.content[3].content[0].content, 'Phase';
51   -$r.content[3].level, 1;
52   -$r.content[4].content[0].content, 'Solid';
53   -$r.content[4].level, 2;
54   -
55   -=begin pod
56   -=comment CORRECT...
57   -=begin item1
58   -The choices are:
59   -=end item1
60   -=item2 Liberty
61   -=item2 Death
62   -=item2 Beer
63   -=end pod
64   -
65   -$r = $=POD[2];
66   -is $r.content.elems, 5;
67   -for 1..4 {
68   - isa_ok $r.content[$_], Pod::Item;
69   -}
70   -
71   -# XXX Those items are :numbered in S26, but we're waiting with block
72   -# configuration until we're inside Rakudo, otherwise we'll have to
73   -# pretty much implement Pair parsing in gsocmess only to get rid of
74   -# it later.
75   -
76   -=begin pod
77   -Let's consider two common proverbs:
78   -
79   -=begin item
80   -I<The rain in Spain falls mainly on the plain.>
81   -
82   -This is a common myth and an unconscionable slur on the Spanish
83   -people, the majority of whom are extremely attractive.
84   -=end item
85   -
86   -=begin item
87   -I<The early bird gets the worm.>
88   -
89   -In deciding whether to become an early riser, it is worth
90   -considering whether you would actually enjoy annelids
91   -for breakfast.
92   -=end item
93   -
94   -As you can see, folk wisdom is often of dubious value.
95   -=end pod
96   -
97   -$r = $=POD[3];
98   -is $r.content.elems, 4;
99   -is $r.content[0].content, "Let's consider two common proverbs:";
100   -ok $r.content[1].content[1].content
101   - ~~ /:s This is a common .+ are extremely attractive/;
102   -ok $r.content[2].content[1].content
103   - ~~ /:s In deciding .+ annelids for breakfast/;
104   -is $r.content[3].content, "As you can see, folk wisdom is often of dubious value.";
137 t/pod/07-tables.t
... ... @@ -1,137 +0,0 @@
1   -use Test;
2   -plan 38;
3   -my $r;
4   -
5   -=begin table
6   - The Shoveller Eddie Stevens King Arthur's singing shovel
7   - Blue Raja Geoffrey Smith Master of cutlery
8   - Mr Furious Roy Orson Ticking time bomb of fury
9   - The Bowler Carol Pinnsler Haunted bowling ball
10   -=end table
11   -
12   -$r = $=POD[0];
13   -isa_ok $r, Pod::Block::Table;
14   -is $r.content.elems, 4;
15   -is $r.content[0].join('|'),
16   - "The Shoveller|Eddie Stevens|King Arthur's singing shovel";
17   -is $r.content[1].join('|'),
18   - "Blue Raja|Geoffrey Smith|Master of cutlery";
19   -is $r.content[2].join('|'),
20   - "Mr Furious|Roy Orson|Ticking time bomb of fury";
21   -is $r.content[3].join('|'),
22   - "The Bowler|Carol Pinnsler|Haunted bowling ball";
23   -
24   -=table
25   - Constants 1
26   - Variables 10
27   - Subroutines 33
28   - Everything else 57
29   -
30   -$r = $=POD[1];
31   -is $r.content.elems, 4;
32   -is $r.content[0].join('|'), "Constants|1";
33   -is $r.content[1].join('|'), "Variables|10";
34   -is $r.content[2].join('|'), "Subroutines|33";
35   -is $r.content[3].join('|'), "Everything else|57";
36   -
37   -=for table
38   - mouse | mice
39   - horse | horses
40   - elephant | elephants
41   -
42   -$r = $=POD[2];
43   -is $r.content.elems, 3;
44   -is $r.content[0].join('|'), "mouse|mice";
45   -is $r.content[1].join('|'), "horse|horses";
46   -is $r.content[2].join('|'), "elephant|elephants";
47   -
48   -=table
49   - Animal | Legs | Eats
50   - =======================
51   - Zebra + 4 + Cookies
52   - Human + 2 + Pizza
53   - Shark + 0 + Fish
54   -
55   -$r = $=POD[3];
56   -is $r.headers.join('|'), "Animal|Legs|Eats";
57   -is $r.content.elems, 3;
58   -is $r.content[0].join('|'), "Zebra|4|Cookies";
59   -is $r.content[1].join('|'), "Human|2|Pizza";
60   -is $r.content[2].join('|'), "Shark|0|Fish";
61   -
62   -=table
63   - Superhero | Secret |
64   - | Identity | Superpower
65   - ==============|=================|================================
66   - The Shoveller | Eddie Stevens | King Arthur's singing shovel
67   -
68   -$r = $=POD[4];
69   -is $r.headers.join('|'), "Superhero|Secret Identity|Superpower";
70   -is $r.content.elems, 1;
71   -is $r.content[0].join('|'),
72   - "The Shoveller|Eddie Stevens|King Arthur's singing shovel";
73   -
74   -=begin table
75   -
76   - Secret
77   - Superhero Identity Superpower
78   - ============= =============== ===================
79   - The Shoveller Eddie Stevens King Arthur's
80   - singing shovel
81   -
82   - Blue Raja Geoffrey Smith Master of cutlery
83   -
84   - Mr Furious Roy Orson Ticking time bomb
85   - of fury
86   -
87   - The Bowler Carol Pinnsler Haunted bowling ball
88   -
89   -=end table
90   -
91   -$r = $=POD[5];
92   -is $r.headers.join('|'), "Superhero|Secret Identity|Superpower";
93   -is $r.content.elems, 4;
94   -is $r.content[0].join('|'),
95   - "The Shoveller|Eddie Stevens|King Arthur's singing shovel";
96   -is $r.content[1].join('|'),
97   - "Blue Raja|Geoffrey Smith|Master of cutlery";
98   -is $r.content[2].join('|'),
99   - "Mr Furious|Roy Orson|Ticking time bomb of fury";
100   -is $r.content[3].join('|'),
101   - "The Bowler|Carol Pinnsler|Haunted bowling ball";
102   -
103   -=table
104   - X | O |
105   - ---+---+---
106   - | X | O
107   - ---+---+---
108   - | | X
109   -
110   -$r = $=POD[6];
111   -is $r.content.elems, 3;
112   -is $r.content[0].join(','), 'X,O,';
113   -is $r.content[1].join(','), ',X,O';
114   -is $r.content[2].join(','), ',,X';
115   -
116   -=table
117   - X O
118   - ===========
119   - X O
120   - ===========
121   - X
122   -
123   -$r = $=POD[7];
124   -is $r.content.elems, 3;
125   -is $r.content[0].join(','), 'X,O,';
126   -is $r.content[1].join(','), ',X,O';
127   -is $r.content[2].join(','), ',,X';
128   -
129   -=begin table
130   -
131   -foo
132   -bar
133   -
134   -=end table
135   -
136   -$r = $=POD[8];
137   -is $r.content.elems, 2;
79 t/pod/08-formattingcodes.t
... ... @@ -1,79 +0,0 @@
1   -use Test;
2   -my $r;
3   -
4   -=pod
5   -B<I am a formatting code>
6   -
7   -$r = $=POD[0].content[0].content[1];
8   -isa_ok $r, Pod::FormattingCode;
9   -is $r.type, 'B';
10   -is $r.content[0], 'I am a formatting code';
11   -
12   -=pod
13   -The basic C<ln> command is: C<ln> B<R<source_file> R<target_file>>
14   -
15   -$r = $=POD[1].content[0].content;
16   -is $r[0], 'The basic ';
17   -isa_ok $r[1], Pod::FormattingCode;
18   -is $r[1].type, 'C';
19   -is $r[1].content, 'ln';
20   -is $r[2], ' command is: ';
21   -isa_ok $r[3], Pod::FormattingCode;
22   -is $r[3].type, 'C';
23   -is $r[3].content, 'ln';
24   -isa_ok $r[5], Pod::FormattingCode;
25   -is $r[4], " ";
26   -is $r[5].type, 'B';
27   -$r = $r[5].content;
28   -is $r[0], "";
29   -isa_ok $r[1], Pod::FormattingCode;
30   -is $r[1].type, 'R';
31   -is $r[1].content, 'source_file';
32   -is $r[2], ' ';
33   -isa_ok $r[3], Pod::FormattingCode;
34   -is $r[3].type, 'R';
35   -is $r[3].content, 'target_file';
36   -
37   -=pod
38   -L<C<b>|a>
39   -L<C<b>|a>
40   -
41   -$r = $=POD[2].content[0].content;
42   -for $r[1], $r[3] -> $link {
43   - is $link.type, 'L';
44   - is $link.content[0], '';
45   - isa_ok $link.content[1], Pod::FormattingCode;
46   - is $link.content[1].content, 'b';
47   - is $link.content[2], '|a';
48   -}
49   -
50   -=begin pod
51   -
52   -=head1 A heading
53   -
54   -This is Pod too. Specifically, this is a simple C<para> block
55   -
56   - $this = pod('also'); # Specifically, a code block
57   -
58   -=end pod
59   -
60   -$r = $=POD[3];
61   -is $r.content.elems, 3;
62   -isa_ok $r.content[0], Pod::Block;
63   -is $r.content[0].content[0].content, 'A heading';
64   -is $r.content[1].content[0],
65   - 'This is Pod too. Specifically, this is a simple ';
66   -isa_ok $r.content[1].content[1], Pod::FormattingCode;
67   -is $r.content[1].content[1].type, 'C';
68   -is $r.content[1].content[1].content, 'para';
69   -is $r.content[1].content[2], ' block';
70   -isa_ok $r.content[2], Pod::Block::Code;
71   -is $r.content[2].content,
72   - q[$this = pod('also'); # Specifically, a code block];
73   -
74   -=pod V<C<boo> B<bar> asd>
75   -
76   -$r = $=POD[4];
77   -is $r.content[0].content, 'C<boo> B<bar> asd';
78   -
79   -done;
50 t/pod/09-configuration.t
... ... @@ -1,50 +0,0 @@
1   -use Test;
2   -plan 14;
3   -my $r;
4   -
5   -=begin pod
6   - =begin code :allow<B>
7   - =end code
8   -=end pod
9   -
10   -$r = $=POD[0].content[0];
11   -isa_ok $r, Pod::Block::Code;
12   -is $r.config<allow>, 'B';
13   -
14   -=begin pod
15   - =config head2 :like<head1> :formatted<I>
16   -=end pod
17   -
18   -$r = $=POD[1].content[0];
19   -isa_ok $r, Pod::Config;
20   -is $r.type, 'head2';
21   -is $r.config<like>, 'head1';
22   -is $r.config<formatted>, 'I';
23   -
24   -=begin pod
25   - =pod :number(42) :zebras :!sheep
26   -=end pod
27   -
28   -$r = $=POD[2].content[0];
29   -is $r.config<number>, 42;
30   -is $r.config<zebras>.Bool, True;
31   -is $r.config<sheep>.Bool, False;
32   -
33   -=begin pod
34   -=for DESCRIPTION :title<presentation template>
35   -= :author<John Brown> :pubdate(2011)
36   -=end pod
37   -
38   -$r = $=POD[3].content[0];
39   -is $r.config<title>, 'presentation template';
40   -is $r.config<author>, 'John Brown';
41   -is $r.config<pubdate>, 2011;
42   -
43   -=begin pod
44   -=for table :caption<Table of contents>
45   - foo bar
46   -=end pod
47   -
48   -$r = $=POD[4].content[0];
49   -isa_ok $r, Pod::Block::Table;
50   -is $r.config<caption>, 'Table of contents';
85 t/pod/why.t
... ... @@ -1,85 +0,0 @@
1   -use Test;
2   -plan 19;
3   -
4   -#= simple case
5   -class Simple {
6   -}
7   -
8   -is Simple.WHY.content, 'simple case';
9   -is ~Simple.WHY, 'simple case', 'stringifies correctly';
10   -
11   -#= giraffe
12   -class Outer {
13   - #= zebra
14   - class Inner {
15   - }
16   -}
17   -
18   -is Outer.WHY.content, 'giraffe';
19   -is Outer::Inner.WHY.content, 'zebra';
20   -
21   -#= a module
22   -module foo {
23   - #= a package
24   - package bar {
25   - #= and a class
26   - class baz {
27   - }
28   - }
29   -}
30   -
31   -is foo.WHY.content, 'a module';
32   -is foo::bar.WHY.content, 'a package';
33   -is foo::bar::baz.WHY.content, 'and a class';
34   -
35   -#= yellow
36   -sub marine {}
37   -is &marine.WHY.content, 'yellow';
38   -
39   -#= pink
40   -sub panther {}
41   -is &panther.WHY.content, 'pink';
42   -
43   -#= a sheep
44   -class Sheep {
45   - #= usually white
46   - has $.wool;
47   -
48   - #= not too scary
49   - method roar { 'roar!' }
50   -}
51   -
52   -is Sheep.WHY.content, 'a sheep';
53   -skip 'segfault', 1;
54   -#is Sheep.^attributes.grep({ .name eq '$!wool' }).WHY, 'usually white';
55   -is Sheep.^find_method('roar').WHY.content, 'not too scary';
56   -
57   -sub routine {}
58   -is &routine.WHY.defined, False;
59   -
60   -#= our works too
61   -our sub oursub {}
62   -is &oursub.WHY, 'our works too', 'works for our subs';
63   -
64   -# two subs in a row
65   -
66   -#= one
67   -sub one {}
68   -
69   -#= two
70   -sub two {}
71   -is &one.WHY.content, 'one';
72   -is &two.WHY.content, 'two';
73   -
74   -#= that will break
75   -sub first {}
76   -
77   -#= that will break
78   -sub second {}
79   -
80   -is &first.WHY.content, 'that will break';
81   -is &second.WHY.content, 'that will break';
82   -
83   -#= trailing space here
84   -sub third {}
85   -is &third.WHY.content, 'trailing space here';
10 t/spectest.data
@@ -494,6 +494,16 @@ S16-unfiled/rebindstdhandles.t
494 494 S16-unfiled/slurp.t
495 495 S19-command-line/dash-e.t # icu
496 496 S19-command-line/help.t
  497 +S26-documentation/01-delimited.t
  498 +S26-documentation/02-paragraph.t
  499 +S26-documentation/03-abbreviated.t
  500 +S26-documentation/04-code.t
  501 +S26-documentation/05-comment.t
  502 +S26-documentation/06-lists.t
  503 +S26-documentation/07-tables.t
  504 +S26-documentation/08-formattingcodes.t
  505 +S26-documentation/09-configuration.t
  506 +S26-documentation/why.t
497 507 S28-named-variables/cwd.t
498 508 S28-named-variables/inc.t
499 509 S29-any/cmp.t
3  tools/build/Makefile.in
@@ -400,9 +400,6 @@ fulltest: coretest stresstest
400 400 coretest: all
401 401 $(PERL) t/harness t/00-parrot t/01-sanity t/02-embed
402 402
403   -podtest: lib/Test.pir
404   - $(PERL) t/harness t/pod
405   -
406 403 # Run the spectests that we know work.
407 404 spectest_regression: spectest
408 405 spectest: testable t/spectest.data

0 comments on commit 59c1c35

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