diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-02 04:39:38 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1999-10-02 04:39:38 +0000 |
commit | 664bb207f6bd57f05b66c9abec00898987f7060b (patch) | |
tree | cb1f2d01968c6d856c6cc0b942f457e1ea3e998f /t | |
parent | 4bd46447950ba8dfb481e9515d0a88ed358d2013 (diff) | |
download | perl-664bb207f6bd57f05b66c9abec00898987f7060b.tar.gz |
upgrade to PodParser-1.085 from Brad Appleton <bradapp@enteract.com>
p4raw-id: //depot/perl@4280
Diffstat (limited to 't')
-rw-r--r-- | t/pod/for.xr | 16 | ||||
-rw-r--r-- | t/pod/headings.xr | 29 | ||||
-rw-r--r-- | t/pod/include.xr | 15 | ||||
-rw-r--r-- | t/pod/included.xr | 4 | ||||
-rw-r--r-- | t/pod/lref.xr | 14 | ||||
-rwxr-xr-x | t/pod/multiline_items.t | 31 | ||||
-rw-r--r-- | t/pod/multiline_items.xr | 5 | ||||
-rw-r--r-- | t/pod/nested_items.xr | 4 | ||||
-rw-r--r-- | t/pod/nested_seqs.xr | 4 | ||||
-rw-r--r-- | t/pod/oneline_cmds.xr | 29 | ||||
-rwxr-xr-x | t/pod/pod2usage.t | 18 | ||||
-rw-r--r-- | t/pod/pod2usage.xr | 55 | ||||
-rw-r--r-- | t/pod/poderrs.xr | 22 | ||||
-rwxr-xr-x | t/pod/podselect.t | 18 | ||||
-rw-r--r-- | t/pod/podselect.xr | 42 | ||||
-rw-r--r-- | t/pod/special_seqs.xr | 14 | ||||
-rw-r--r-- | t/pod/testp2pt.pl | 18 |
17 files changed, 254 insertions, 84 deletions
diff --git a/t/pod/for.xr b/t/pod/for.xr index 25794ab0fe..5f6b8b2ce8 100644 --- a/t/pod/for.xr +++ b/t/pod/for.xr @@ -1,19 +1,21 @@ This is a test - pod2text should see this and this and this + pod2text should see this + and this + and this and everything should see this! - Similarly, this line ... +Similarly, this line ... - and this one ... +and this one ... - as well this one, +as well this one, - should all be in pod2text output +should all be in pod2text output - Tweedley-deedley-dee, Im as happy as can be! Tweedley-deedley- - dum, cuz youre my honey sugar plum! + Tweedley-deedley-dee, Im as happy as can be! Tweedley-deedley-dum, cuz + youre my honey sugar plum! The rest of this should show up in everything. diff --git a/t/pod/headings.xr b/t/pod/headings.xr index e1277b7e37..fb37a2b0cf 100644 --- a/t/pod/headings.xr +++ b/t/pod/headings.xr @@ -5,25 +5,22 @@ SYNOPSIS rdb2pg [*param*=*value* ...] PARAMETERS - rdb2pg uses an IRAF-compatible parameter interface. A template - parameter file is in /proj/axaf/simul/lib/uparm/rdb2pg.par. + rdb2pg uses an IRAF-compatible parameter interface. A template parameter + file is in /proj/axaf/simul/lib/uparm/rdb2pg.par. input *file* - The RDB file to insert into the database. If the given name - is the string `stdin', it reads from the UNIX standard input - stream. - + The RDB file to insert into the database. If the given name is the + string `stdin', it reads from the UNIX standard input stream. DESCRIPTION - rdb2pg will enter the data from an RDB database into a - PostgreSQL database table, optionally creating the database and - the table if they do not exist. It automatically determines the - PostgreSQL data type from the column definition in the RDB file, - but may be overriden via a series of definition files or - directly via one of its parameters. + rdb2pg will enter the data from an RDB database into a PostgreSQL + database table, optionally creating the database and the table if they + do not exist. It automatically determines the PostgreSQL data type from + the column definition in the RDB file, but may be overriden via a series + of definition files or directly via one of its parameters. - The target database and table are specified by the `db' and - `table' parameters. If they do not exist, and the `createdb' - parameter is set, they will be created. Table field definitions - are determined in the following order: + The target database and table are specified by the `db' and `table' + parameters. If they do not exist, and the `createdb' parameter is set, + they will be created. Table field definitions are determined in the + following order: diff --git a/t/pod/include.xr b/t/pod/include.xr index 1bac06adb1..624ee44447 100644 --- a/t/pod/include.xr +++ b/t/pod/include.xr @@ -1,20 +1,19 @@ - This file tries to demonstrate a simple =include directive for - pods. It is used as follows: + This file tries to demonstrate a simple =include directive for pods. It + is used as follows: =include filename - where "filename" is expected to be an absolute pathname, or else - reside be relative to the directory in which the current - processed podfile resides, or be relative to the current - directory. + where "filename" is expected to be an absolute pathname, or else reside + be relative to the directory in which the current processed podfile + resides, or be relative to the current directory. Lets try it out with the file "included.t" shall we. ***THIS TEXT IS IMMEDIATELY BEFORE THE INCLUDE*** ###### begin =include included.t ##### - This is the text of the included file named "included.t". It - should appear in the final pod document from pod2xxx + This is the text of the included file named "included.t". It should + appear in the final pod document from pod2xxx ###### end =include included.t ##### ***THIS TEXT IS IMMEDIATELY AFTER THE INCLUDE*** diff --git a/t/pod/included.xr b/t/pod/included.xr index f0bc03bf09..54142fa0d3 100644 --- a/t/pod/included.xr +++ b/t/pod/included.xr @@ -1,3 +1,3 @@ - This is the text of the included file named "included.t". It - should appear in the final pod document from pod2xxx + This is the text of the included file named "included.t". It should + appear in the final pod document from pod2xxx diff --git a/t/pod/lref.xr b/t/pod/lref.xr index d8455e3874..297053b1ac 100644 --- a/t/pod/lref.xr +++ b/t/pod/lref.xr @@ -1,22 +1,22 @@ Try out *LOTS* of different ways of specifying references: - Reference the the "section" entry in the manpage manpage + Reference the the section entry in the manpage manpage - Reference the the "section" entry in the manpage manpage + Reference the the section entry in the manpage manpage - Reference the the "section" entry in the manpage manpage + Reference the the section entry in the manpage manpage - Reference the the "section" entry in the manpage manpage + Reference the the section entry in the manpage manpage Reference the the section on "manpage/section" - Reference the the "section" entry in the "manpage" manpage + Reference the the section entry in the "manpage" manpage Reference the the section on "section" in the manpage manpage - Reference the the "section" entry in the manpage manpage + Reference the the section entry in the manpage manpage - Reference the the "section" entry in the manpage manpage + Reference the the section entry in the manpage manpage Now try it using the new "|" stuff ... diff --git a/t/pod/multiline_items.t b/t/pod/multiline_items.t new file mode 100755 index 0000000000..0fe410a4e6 --- /dev/null +++ b/t/pod/multiline_items.t @@ -0,0 +1,31 @@ +BEGIN { + use File::Basename; + my $THISDIR = dirname $0; + unshift @INC, $THISDIR; + require "testp2pt.pl"; + import TestPodIncPlainText; +} + +my %options = map { $_ => 1 } @ARGV; ## convert cmdline to options-hash +my $passed = testpodplaintext \%options, $0; +exit( ($passed == 1) ? 0 : -1 ) unless $ENV{HARNESS_ACTIVE}; + + +__END__ + + +=head1 Test multiline item lists + +This is a test to ensure that multiline =item paragraphs +get indented appropriately. + +=over 4 + +=item This +is +a +test. + +=back + +=cut diff --git a/t/pod/multiline_items.xr b/t/pod/multiline_items.xr new file mode 100644 index 0000000000..dddf05fe34 --- /dev/null +++ b/t/pod/multiline_items.xr @@ -0,0 +1,5 @@ +Test multiline item lists + This is a test to ensure that multiline =item paragraphs get indented + appropriately. + + This is a test. diff --git a/t/pod/nested_items.xr b/t/pod/nested_items.xr index 7d72bbe890..dd1adac127 100644 --- a/t/pod/nested_items.xr +++ b/t/pod/nested_items.xr @@ -1,6 +1,6 @@ Test nested item lists - This is a test to ensure the nested =item paragraphs get - indented appropriately. + This is a test to ensure the nested =item paragraphs get indented + appropriately. 1 First section. diff --git a/t/pod/nested_seqs.xr b/t/pod/nested_seqs.xr index 5a008c17e9..f981061f94 100644 --- a/t/pod/nested_seqs.xr +++ b/t/pod/nested_seqs.xr @@ -1,3 +1,3 @@ - The statement: `This is dog kind's *finest* hour!' is a parody - of a quotation from Winston Churchill. + The statement: `This is dog kind's *finest* hour!' is a parody of a + quotation from Winston Churchill. diff --git a/t/pod/oneline_cmds.xr b/t/pod/oneline_cmds.xr index e1277b7e37..fb37a2b0cf 100644 --- a/t/pod/oneline_cmds.xr +++ b/t/pod/oneline_cmds.xr @@ -5,25 +5,22 @@ SYNOPSIS rdb2pg [*param*=*value* ...] PARAMETERS - rdb2pg uses an IRAF-compatible parameter interface. A template - parameter file is in /proj/axaf/simul/lib/uparm/rdb2pg.par. + rdb2pg uses an IRAF-compatible parameter interface. A template parameter + file is in /proj/axaf/simul/lib/uparm/rdb2pg.par. input *file* - The RDB file to insert into the database. If the given name - is the string `stdin', it reads from the UNIX standard input - stream. - + The RDB file to insert into the database. If the given name is the + string `stdin', it reads from the UNIX standard input stream. DESCRIPTION - rdb2pg will enter the data from an RDB database into a - PostgreSQL database table, optionally creating the database and - the table if they do not exist. It automatically determines the - PostgreSQL data type from the column definition in the RDB file, - but may be overriden via a series of definition files or - directly via one of its parameters. + rdb2pg will enter the data from an RDB database into a PostgreSQL + database table, optionally creating the database and the table if they + do not exist. It automatically determines the PostgreSQL data type from + the column definition in the RDB file, but may be overriden via a series + of definition files or directly via one of its parameters. - The target database and table are specified by the `db' and - `table' parameters. If they do not exist, and the `createdb' - parameter is set, they will be created. Table field definitions - are determined in the following order: + The target database and table are specified by the `db' and `table' + parameters. If they do not exist, and the `createdb' parameter is set, + they will be created. Table field definitions are determined in the + following order: diff --git a/t/pod/pod2usage.t b/t/pod/pod2usage.t new file mode 100755 index 0000000000..cf2c31b83f --- /dev/null +++ b/t/pod/pod2usage.t @@ -0,0 +1,18 @@ +BEGIN { + use File::Basename; + my $THISDIR = dirname $0; + unshift @INC, $THISDIR; + require "testp2pt.pl"; + import TestPodIncPlainText; +} + +my %options = map { $_ => 1 } @ARGV; ## convert cmdline to options-hash +my $passed = testpodplaintext \%options, $0; +exit( ($passed == 1) ? 0 : -1 ) unless $ENV{HARNESS_ACTIVE}; + + +__END__ + +=include pod2usage.PL + + diff --git a/t/pod/pod2usage.xr b/t/pod/pod2usage.xr new file mode 100644 index 0000000000..7315d4025a --- /dev/null +++ b/t/pod/pod2usage.xr @@ -0,0 +1,55 @@ +###### begin =include pod2usage.PL ##### +NAME + pod2usage - print usage messages from embedded pod docs in files + +SYNOPSIS + pod2usage [-help] [-man] [-exit *exitval*] [-output *outfile*] + [-verbose *level*] [-pathlist *dirlist*] *file* + +OPTIONS AND ARGUMENTS + -help Print a brief help message and exit. + + -man Print this command's manual page and exit. + + -exit *exitval* + The exit status value to return. + + -output *outfile* + The output file to print to. If the special names "-" or ">&1" + or ">&STDOUT" are used then standard output is used. If ">&2" or + ">&STDERR" is used then standard error is used. + + -verbose *level* + The desired level of verbosity to use: + + 1 : print SYNOPSIS only + 2 : print SYNOPSIS sections and any OPTIONS/ARGUMENTS sections + 3 : print the entire manpage (similar to running pod2text) + + -pathlist *dirlist* + Specifies one or more directories to search for the input file + if it was not supplied with an absolute path. Each directory + path in the given list should be separated by a ':' on Unix (';' + on MSWin32 and DOS). + + *file* The pathname of a file containing pod documentation to be output + in usage mesage format (defaults to standard input). + +DESCRIPTION + pod2usage will read the given input file looking for pod documentation + and will print the corresponding usage message. If no input file is + specifed than standard input is read. + + pod2usage invokes the pod2usage() function in the Pod::Usage module. + Please see the pod2usage() entry in the Pod::Usage manpage. + +SEE ALSO + the Pod::Usage manpage, the pod2text(1) manpage + +AUTHOR + Brad Appleton <bradapp@enteract.com> + + Based on code for pod2text(1) written by Tom Christiansen + <tchrist@mox.perl.com> + +###### end =include pod2usage.PL ##### diff --git a/t/pod/poderrs.xr b/t/pod/poderrs.xr index a7bc42d956..bbad674e84 100644 --- a/t/pod/poderrs.xr +++ b/t/pod/poderrs.xr @@ -1,11 +1,11 @@ -*** ERROR: Unknown command "unknown1" at line 21 of file t/poderrs.t -*** ERROR: Unknown interior-sequence "N" at line 21 of file t/poderrs.t -*** ERROR: Unknown interior-sequence "D" at line 22 of file t/poderrs.t -*** ERROR: Unknown interior-sequence "Q" at line 25 of file t/poderrs.t -*** ERROR: Unknown interior-sequence "A" at line 26 of file t/poderrs.t -*** ERROR: Unknown interior-sequence "V" at line 27 of file t/poderrs.t -*** ERROR: Unknown interior-sequence "Y" at line 27 of file t/poderrs.t -** Unterminated B<...> at t/poderrs.t line 31 -** Unterminated I<...> at t/poderrs.t line 30 -** Unterminated C<...> at t/poderrs.t line 33 -t/poderrs.t has 10 pod syntax errors. +*** ERROR: Unknown command "unknown1" at line 21 in file t/pod/poderrs.t +*** ERROR: Unknown interior-sequence "N" at line 21 in file t/pod/poderrs.t +*** ERROR: Unknown interior-sequence "D" at line 22 in file t/pod/poderrs.t +*** ERROR: Unknown interior-sequence "Q" at line 25 in file t/pod/poderrs.t +*** ERROR: Unknown interior-sequence "A" at line 26 in file t/pod/poderrs.t +*** ERROR: Unknown interior-sequence "V" at line 27 in file t/pod/poderrs.t +*** ERROR: Unknown interior-sequence "Y" at line 27 in file t/pod/poderrs.t +** Unterminated B<...> at t/pod/poderrs.t line 31 +** Unterminated I<...> at t/pod/poderrs.t line 30 +** Unterminated C<...> at t/pod/poderrs.t line 33 +t/pod/poderrs.t has 10 pod syntax errors. diff --git a/t/pod/podselect.t b/t/pod/podselect.t new file mode 100755 index 0000000000..0004548cb7 --- /dev/null +++ b/t/pod/podselect.t @@ -0,0 +1,18 @@ +BEGIN { + use File::Basename; + my $THISDIR = dirname $0; + unshift @INC, $THISDIR; + require "testp2pt.pl"; + import TestPodIncPlainText; +} + +my %options = map { $_ => 1 } @ARGV; ## convert cmdline to options-hash +my $passed = testpodplaintext \%options, $0; +exit( ($passed == 1) ? 0 : -1 ) unless $ENV{HARNESS_ACTIVE}; + + +__END__ + +=include podselect.PL + + diff --git a/t/pod/podselect.xr b/t/pod/podselect.xr new file mode 100644 index 0000000000..7d1188d84c --- /dev/null +++ b/t/pod/podselect.xr @@ -0,0 +1,42 @@ +###### begin =include podselect.PL ##### +NAME + podselect - print selected sections of pod documentation on standard + output + +SYNOPSIS + podselect [-help] [-man] [-section *section-spec*] [*file* ...] + +OPTIONS AND ARGUMENTS + -help Print a brief help message and exit. + + -man Print the manual page and exit. + + -section *section-spec* + Specify a section to include in the output. See the section on + "SECTION SPECIFICATIONS" in the Pod::Parser manpage for the + format to use for *section-spec*. This option may be given + multiple times on the command line. + + *file* The pathname of a file from which to select sections of pod + documentation (defaults to standard input). + +DESCRIPTION + podselect will read the given input files looking for pod documentation + and will print out (in raw pod format) all sections that match one ore + more of the given section specifications. If no section specifications + are given than all pod sections encountered are output. + + podselect invokes the podselect() function exported by Pod::Select + Please see the podselect() entry in the Pod::Select manpage for more + details. + +SEE ALSO + the Pod::Parser manpage and the Pod::Select manpage + +AUTHOR + Brad Appleton <bradapp@enteract.com> + + Based on code for Pod::Text::pod2text(1) written by Tom Christiansen + <tchrist@mox.perl.com> + +###### end =include podselect.PL ##### diff --git a/t/pod/special_seqs.xr b/t/pod/special_seqs.xr index 6795de0490..fc06593d9d 100644 --- a/t/pod/special_seqs.xr +++ b/t/pod/special_seqs.xr @@ -1,13 +1,11 @@ - This is a test to see if I can do not only `$self' and - `method()', but also `$self->method()' and `$self->{FIELDNAME}' - and `{FOO=>BAR}' without resorting to escape sequences. + This is a test to see if I can do not only `$self' and `method()', but + also `$self->method()' and `$self->{FIELDNAME}' and `{FOO=>BAR}' without + resorting to escape sequences. - Now for the grand finale of `$self->method()->{FIELDNAME} = - {FOO=>BAR}'. + Now for the grand finale of `$self->method()->{FIELDNAME} = {FOO=>BAR}'. - Of course I should still be able to do all this *with* escape - sequences too: `$self->method()' and `$self->{FIELDNAME}' and - `{FOO=>BAR}'. + Of course I should still be able to do all this *with* escape sequences + too: `$self->method()' and `$self->{FIELDNAME}' and `{FOO=>BAR}'. Dont forget `$self->method()->{FIELDNAME} = {FOO=>BAR}'. diff --git a/t/pod/testp2pt.pl b/t/pod/testp2pt.pl index 9df5b9f2ed..d917ad9d21 100644 --- a/t/pod/testp2pt.pl +++ b/t/pod/testp2pt.pl @@ -13,8 +13,6 @@ BEGIN { push @INC, map { File::Spec->catfile($_, 'lib') } ($PARENTDIR, $THISDIR); } -use Pod::PlainText; -use vars qw(@ISA @EXPORT $MYPKG); #use strict; #use diagnostics; use Carp; @@ -22,13 +20,23 @@ use Exporter; #use File::Compare; #use Cwd qw(abs_path); -@ISA = qw(Pod::PlainText); -@EXPORT = qw(&testpodplaintext); +use vars qw($MYPKG @EXPORT @ISA); $MYPKG = eval { (caller)[0] }; +@EXPORT = qw(&testpodplaintext); +BEGIN { + if ( $] >= 5.005_58 ) { + require Pod::Text; + @ISA = qw( Pod::Text ); + } + else { + require Pod::PlainText; + @ISA = qw( Pod::PlainText ); + } +} ## Hardcode settings for TERMCAP and COLUMNS so we can try to get ## reproducible results between environments -@ENV{qw(TERMCAP COLUMNS)} = ('co=72:do=^J', 72); +@ENV{qw(TERMCAP COLUMNS)} = ('co=76:do=^J', 76); sub catfile(@) { File::Spec->catfile(@_); } |