1N/ANAME
1N/A basic.pod - Test of various basic POD features in translators.
1N/A
1N/AHEADINGS
1N/A Try a few different levels of headings, with embedded formatting codes
1N/A and other interesting bits.
1N/A
1N/AThis "is" a "level 1" heading
1N/A ``Level'' "2 *heading*
1N/A Level 3 heading *with "weird stuff "" (double quote)"*
1N/A Level "4 "heading"
1N/A Now try again with intermixed text.
1N/A
1N/AThis "is" a "level 1" heading
1N/A Text.
1N/A
1N/A ``Level'' 2 *heading*
1N/A Text.
1N/A
1N/A Level 3 heading *with "weird stuff"*
1N/A Text.
1N/A
1N/A Level "4 "heading"
1N/A Text.
1N/A
1N/ALINKS
1N/A These are all taken from the Pod::Parser tests.
1N/A
1N/A Try out *LOTS* of different ways of specifying references:
1N/A
1N/A Reference the "section" in manpage
1N/A
1N/A Reference the "section" in manpage
1N/A
1N/A Reference the "section" in manpage
1N/A
1N/A Reference the "section" in manpage
1N/A
1N/A Reference the "manpage/section"
1N/A
1N/A Reference the "section" in "manpage"
1N/A
1N/A Reference the "section" in manpage
1N/A
1N/A Reference the "section" in manpage
1N/A
1N/A Reference the "section" in manpage
1N/A
1N/A Now try it using the new "|" stuff ...
1N/A
1N/A Reference the thistext|
1N/A
1N/A Reference the thistext |
1N/A
1N/A Reference the thistext|
1N/A
1N/A Reference the thistext |
1N/A
1N/A Reference the thistext|
1N/A
1N/A Reference the thistext |
1N/A
1N/A Reference the thistext|
1N/A
1N/A Reference the thistext|
1N/A
1N/A Reference the thistext |
1N/A
1N/A And then throw in a few new ones of my own.
1N/A
1N/A foo
1N/A
1N/A foo
1N/A
1N/A "bar" in foo
1N/A
1N/A "baz boo" in foo
1N/A
1N/A "bar"
1N/A
1N/A "baz boo"
1N/A
1N/A "baz boo"
1N/A
1N/A "baz boo" in foo bar
1N/A
1N/A "baz boo" in foo bar
1N/A
1N/A "boo" in foo bar baz
1N/A
1N/A "boo var baz"
1N/A
1N/A "bar baz"
1N/A
1N/A "boo bar baz / baz boo"
1N/A
1N/A "boo", "bar", and "baz"
1N/A
1N/A foobar
1N/A
1N/A Testing *italics*
1N/A
1N/A "*Italic* text" in foo
1N/A
1N/A "Section "with" *other markup*" in foo|bar
1N/A
1N/A Nested <http://www.perl.org/>
1N/A
1N/AOVER AND ITEMS
1N/A Taken from Pod::Parser tests, this is a test to ensure that multiline
1N/A =item paragraphs get indented appropriately.
1N/A
1N/A This is a test.
1N/A
1N/A There should be whitespace now before this line.
1N/A
1N/A Taken from Pod::Parser tests, this is a test to ensure the nested =item
1N/A paragraphs get indented appropriately.
1N/A
1N/A 1 First section.
1N/A
1N/A a this is item a
1N/A
1N/A b this is item b
1N/A
1N/A 2 Second section.
1N/A
1N/A a this is item a
1N/A
1N/A b this is item b
1N/A
1N/A c
1N/A d This is item c & d.
1N/A
1N/A Now some additional weirdness of our own. Make sure that multiple tags
1N/A for one paragraph are properly compacted.
1N/A
1N/A "foo"
1N/A bar
1N/A "baz"
1N/A There shouldn't be any spaces between any of these item tags; this
1N/A idiom is used in perlfunc.
1N/A
1N/A Some longer item text
1N/A Just to make sure that we test paragraphs where the item text
1N/A doesn't fit in the margin of the paragraph (and make sure that this
1N/A paragraph fills a few lines).
1N/A
1N/A Let's also make it multiple paragraphs to be sure that works.
1N/A
1N/A Test use of =over without =item as a block "quote" or block paragraph.
1N/A
1N/A This should be indented four spaces but otherwise formatted the same
1N/A as any other regular text paragraph. Make sure it's long enough to
1N/A see the results of the formatting.....
1N/A
1N/A Now try the same thing nested, and make sure that the indentation is
1N/A reset back properly.
1N/A
1N/A This paragraph should be doubly indented.
1N/A
1N/A This paragraph should only be singly indented.
1N/A
1N/A * This is an item in the middle of a block-quote, which should be
1N/A allowed.
1N/A
1N/A * We're also testing tagless item commands.
1N/A
1N/A Should be back to the single level of indentation.
1N/A
1N/A Should be back to regular indentation.
1N/A
1N/A Now also check the transformation of * into real bullets for man pages.
1N/A
1N/A * An item. We're also testing using =over without a number, and making
1N/A sure that item text wraps properly.
1N/A
1N/A * Another item.
1N/A
1N/A and now test the numbering of item blocks.
1N/A
1N/A 1. First item.
1N/A
1N/A 2. Second item.
1N/A
1N/AFORMATTING CODES
1N/A Another test taken from Pod::Parser.
1N/A
1N/A This is a test to see if I can do not only $self and "method()", but
1N/A also "$self->method()" and "$self->{FIELDNAME}" and "$Foo <=> $Bar"
1N/A without resorting to escape sequences. If I want to refer to the
1N/A right-shift operator I can do something like "$x >> 3" or even "$y >>
1N/A 5".
1N/A
1N/A Now for the grand finale of "$self->method()->{FIELDNAME} = {FOO=>BAR}".
1N/A And I also want to make sure that newlines work like this
1N/A "$self->{FOOBAR} >> 3 and [$b => $a]->[$a <=> $b]"
1N/A
1N/A Of course I should still be able to do all this *with* escape sequences
1N/A too: "$self->method()" and "$self->{FIELDNAME}" and "{FOO=>BAR}".
1N/A
1N/A Dont forget "$self->method()->{FIELDNAME} = {FOO=>BAR}".
1N/A
1N/A And make sure that 0 works too!
1N/A
1N/A Now, if I use << or >> as my delimiters, then I have to use whitespace.
1N/A So things like "<$self-"method()>> and "<$self-"{FIELDNAME}>> wont end
1N/A up doing what you might expect since the first > will still terminate
1N/A the first < seen.
1N/A
1N/A Lets make sure these work for empty ones too, like and ">>" (just to be
1N/A obnoxious)
1N/A
1N/A The statement: "This is dog kind's *finest* hour!" is a parody of a
1N/A quotation from Winston Churchill.
1N/A
1N/A The following tests are added to those:
1N/A
1N/A Make sure that a few other odd *things* still work. This should be a
1N/A vertical bar: |. Here's a test of a few more special escapes that have
1N/A to be supported:
1N/A
1N/A & An ampersand.
1N/A
1N/A ' An apostrophe.
1N/A
1N/A < A less-than sign.
1N/A
1N/A > A greater-than sign.
1N/A
1N/A " A double quotation mark.
1N/A
1N/A / A forward slash.
1N/A
1N/A Try to get this bit of text over towards the edge so
1N/A |that all of this text inside S<> won't| be wrapped. Also test the
1N/A |same thing with non-breaking spaces.|
1N/A
1N/A There is a soft hyphen in hyphen at hy-phen.
1N/A
1N/A This is a test of an index entry.
1N/A
1N/AVERBATIM
1N/A Throw in a few verbatim paragraphs.
1N/A
1N/A use Term::ANSIColor;
1N/A print color 'bold blue';
1N/A print "This text is bold blue.\n";
1N/A print color 'reset';
1N/A print "This text is normal.\n";
1N/A print colored ("Yellow on magenta.\n", 'yellow on_magenta');
1N/A print "This text is normal.\n";
1N/A print colored ['yellow on_magenta'], "Yellow on magenta.\n";
1N/A
1N/A use Term::ANSIColor qw(uncolor);
1N/A print uncolor '01;31', "\n";
1N/A
1N/A But this isn't verbatim (make sure it wraps properly), and the next
1N/A paragraph is again:
1N/A
1N/A use Term::ANSIColor qw(:constants);
1N/A print BOLD, BLUE, "This text is in bold blue.\n", RESET;
1N/A
1N/A use Term::ANSIColor qw(:constants); $Term::ANSIColor::AUTORESET = 1; print BOLD BLUE "This text is in bold blue.\n"; print "This text is normal.\n";
1N/A
1N/A (Ugh, that's obnoxiously long.) Try different spacing:
1N/A
1N/A Starting with a tab.
1N/A Not
1N/A starting
1N/A with
1N/A a
1N/A tab. But this should still be verbatim.
1N/A As should this.
1N/A
1N/A This isn't.
1N/A
1N/A This is. And this: is an internal tab. It should be:
1N/A |--| <= lined up with that.
1N/A
1N/A (Tricky, but tabs should be expanded before the translator starts in on
1N/A the text since otherwise text with mixed tabs and spaces will get messed
1N/A up.)
1N/A
1N/A And now we test verbatim paragraphs right before a heading. Older
1N/A versions of Pod::Man generated two spaces between paragraphs like this
1N/A and the heading. (In order to properly test this, one may have to
1N/A visually inspect the nroff output when run on the generated *roff
1N/A text, unfortunately.)
1N/A
1N/ACONCLUSION
1N/A That's all, folks!
1N/A