Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Move comment-related tests to a separate file
- Loading branch information
Tadeusz Sośnierz
committed
Jun 14, 2011
1 parent
fefcd4e
commit 4a1e0ad
Showing
2 changed files
with
74 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,72 @@ | ||
| use Pod6; | ||
| use Test; | ||
| plan 15; | ||
|
|
||
| my ($x, $r); | ||
|
|
||
| $x = q[ | ||
| =begin comment | ||
| foo foo | ||
| =begin invalid pod | ||
| =as many invalid pod as we want | ||
| ===yay! | ||
| =end comment | ||
| ]; | ||
|
|
||
| $r = Pod6::parse($x); | ||
| isa_ok $r, Pod6::Block; | ||
| is $r.content.elems, 1; | ||
| is $r.content[0], "foo foo\n=begin invalid pod\n" | ||
| ~ "=as many invalid pod as we want\n===yay!\n"; | ||
|
|
||
| $x = q[ | ||
| =for comment | ||
| foo foo | ||
| bla bla bla | ||
| This isn't a comment | ||
| ]; | ||
|
|
||
| $r = Pod6::parse($x); | ||
| isa_ok $r, Pod6::Block::Comment; | ||
| is $r.content.elems, 1; | ||
| is $r.content[0], "foo foo\nbla bla bla\n"; | ||
|
|
||
| $x = q[ | ||
| =comment foo foo | ||
| bla bla bla | ||
| This isn't a comment | ||
| ]; | ||
|
|
||
| $r = Pod6::parse($x); | ||
| isa_ok $r, Pod6::Block::Comment; | ||
| is $r.content.elems, 1; | ||
| is $r.content[0], "foo foo\nbla bla bla\n"; | ||
|
|
||
| # just checking if Code works too | ||
| $x = q[ | ||
| =begin pod | ||
| =code foo foo | ||
| bla bla bla | ||
| This isn't a comment | ||
| =end pod | ||
| ]; | ||
|
|
||
| $r = Pod6::parse($x); | ||
| isa_ok $r.content[0], Pod6::Block::Code; | ||
| is $r.content[0].elems, 1; | ||
| is $r.content[0].content, "foo foo\nbla bla bla\n"; | ||
|
|
||
| # from S26 | ||
| $x = q[ | ||
| =comment | ||
| This file is deliberately specified in Perl 6 Pod format | ||
| ]; | ||
|
|
||
| $r = Pod6::parse($x); | ||
| isa_ok $r, Pod6::Block::Comment; | ||
| is $r.content.elems, 1; | ||
| is $r.content[0], | ||
| "This file is deliberately specified in Perl 6 Pod format\n"; |