--- /dev/null
+#!perl
+use strict;
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
+
+use File::Basename;
+use File::Spec;
+use Test::More;
+plan tests => 8;
+
+use_ok( 'Pod::Usage' );
+
+# Test verbose level 0
+my $vbl_0 = << 'EOMSG';
+Usage:
+ The SYNOPSIS section is displayed with -verbose >= 0.
+
+EOMSG
+my $fake_out = tie *FAKEOUT, 'CatchOut';
+pod2usage({ -verbose => 0, -exit => 'noexit', -output => \*FAKEOUT });
+is( $$fake_out, $vbl_0, 'Verbose level 0' );
+
+my $msg = "Prefix message for pod2usage()";
+$$fake_out = '';
+pod2usage({ -verbose => 0, -exit => 'noexit', -output => \*FAKEOUT,
+ -message => $msg });
+is( $$fake_out, "$msg\n$vbl_0", '-message parameter' );
+
+SKIP: {
+ my( $file, $path ) = fileparse( $0 );
+ skip( 'File in current directory', 2 ) if -e $file;
+ $$fake_out = '';
+ eval {
+ pod2usage({ -verbose => 0, -exit => 'noexit',
+ -output => \*FAKEOUT, -input => $file });
+ };
+ like( $@, qr/^Can't open $file for reading:/,
+ 'File not found without -pathlist' );
+
+ eval {
+ pod2usage({ -verbose => 0, -exit => 'noexit',
+ -output => \*FAKEOUT, -input => $file,
+ -pathlist => $path });
+ };
+ is( $$fake_out, $vbl_0, '-pathlist parameter' );
+}
+
+{ # Test exit status from pod2usage()
+ my $exit = 42;
+ my $dev_null = File::Spec->devnull;
+ my $args = join ", ", (
+ "-verbose => 0",
+ "-exit => $exit",
+ "-output => q[$dev_null]",
+ "-input => q[$0]",
+ );
+ my $prg = qq[pod2usage({ $args })];
+ my @cmd = ( $^X, '-I../lib', '-MPod::Usage', '-e', $prg );
+
+ is( system( @cmd ) >> 8, $exit, 'Exit status of pod2usage()' );
+}
+
+# Test verbose level 1
+my $vbl_1 = << 'EOMSG';
+Usage:
+ The SYNOPSIS section is displayed with -verbose >= 0.
+
+Options:
+ The OPTIONS section is displayed with -verbose >= 1.
+
+Arguments:
+ The ARGUMENTS section is displayed with -verbose >= 1.
+
+EOMSG
+$$fake_out = '';
+pod2usage( { -verbose => 1, -exit => 'noexit', -output => \*FAKEOUT } );
+is( $$fake_out, $vbl_1, 'Verbose level 1' );
+
+# Test verbose level 2
+$$fake_out = '';
+require Pod::Text; # Pod::Usage->isa( 'Pod::Text' )
+
+( my $p2tp = new Pod::Text )->parse_from_file( $0, \*FAKEOUT );
+my $pod2text = $$fake_out;
+
+$$fake_out = '';
+pod2usage( { -verbose => 2, -exit => 'noexit', -output => \*FAKEOUT } );
+my $pod2usage = $$fake_out;
+
+is( $pod2usage, $pod2text, 'Verbose level >= 2 eq pod2text' );
+
+
+package CatchOut;
+sub TIEHANDLE { bless \( my $self ), shift }
+sub PRINT { my $self = shift; $$self .= $_[0] }
+
+__END__
+
+=head1 NAME
+
+Usage.t - Tests for Pod::Usage
+
+=head1 SYNOPSIS
+
+The B<SYNOPSIS> section is displayed with -verbose >= 0.
+
+=head1 DESCRIPTION
+
+Testing Pod::Usage. This section is not displayed with -verbose < 2.
+
+=head1 OPTIONS
+
+The B<OPTIONS> section is displayed with -verbose >= 1.
+
+=head1 ARGUMENTS
+
+The B<ARGUMENTS> section is displayed with -verbose >= 1.
+
+=head1 AUTHOR
+
+20020105 Abe Timmerman <abe@ztreet.demon.nl>
+
+=cut
=back
-=head2 perlfaq - frequently asked questions about Perl ($Date: 2001/11/19
-17:09:37 $)
+=head2 perlfaq - frequently asked questions about Perl ($Date: 2002/01/11
+02:31:20 $)
=over 4
=back
-=head2 perlfaq1 - General Questions About Perl ($Revision: 1.2 $, $Date:
-2001/11/09 08:06:04 $)
+=head2 perlfaq1 - General Questions About Perl ($Revision: 1.4 $, $Date:
+2002/01/18 21:00:17 $)
=over 4
=back
-=head2 perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.3 $,
-$Date: 2001/11/09 08:06:04 $)
+=head2 perlfaq2 - Obtaining and Learning about Perl ($Revision: 1.5 $,
+$Date: 2002/01/18 21:00:17 $)
=over 4
=back
-=head2 perlfaq3 - Programming Tools ($Revision: 1.10 $, $Date: 2001/11/19
-17:09:37 $)
+=head2 perlfaq3 - Programming Tools ($Revision: 1.11 $, $Date: 2002/01/11
+02:31:20 $)
=over 4
=back
-=head2 perlfaq4 - Data Manipulation ($Revision: 1.10 $, $Date: 2002/01/01
-22:26:45 $)
+=head2 perlfaq4 - Data Manipulation ($Revision: 1.11 $, $Date: 2002/01/11
+02:31:20 $)
=over 4
=back
-=head2 perlfaq5 - Files and Formats ($Revision: 1.6 $, $Date: 2001/12/19
-18:17:00 $)
+=head2 perlfaq5 - Files and Formats ($Revision: 1.7 $, $Date: 2002/01/11
+02:31:20 $)
=over 4
=back
-=head2 perlfaq8 - System Interaction ($Revision: 1.4 $, $Date: 2001/11/09
-08:06:04 $)
+=head2 perlfaq8 - System Interaction ($Revision: 1.5 $, $Date: 2002/01/11
+02:31:20 $)
=over 4
=item DESCRIPTION
-=item Global Variables
-
-PL_DBsingle, PL_DBsub, PL_DBtrace, PL_dowarn, PL_last_in_gv, PL_ofs_sv,
-PL_rs
-
-=item GV Functions
-
-is_gv_magical
-
-=item IO Functions
-
-start_glob
-
-=item Stack Manipulation Macros
-
-djSP, LVRET
-
-=item SV Manipulation Functions
-
-report_uninit, sv_add_arena, sv_clean_all, sv_clean_objs, sv_free_arenas
+djSP, is_gv_magical, LVRET, PL_DBsingle, PL_DBsub, PL_DBtrace, PL_dowarn,
+PL_last_in_gv, PL_ofs_sv, PL_rs, report_uninit, start_glob, sv_add_arena,
+sv_clean_all, sv_clean_objs, sv_free_arenas
=item AUTHORS
=item Security audit shipped utilities
-=item Custom opcodes
+=item Sort out the uid-setting mess
=item DLL Versioning
=item Attach/detach debugger from running program
-=item Alternative RE syntax module
-
=item GUI::Native
=item foreach(reverse ...)
=over 4
+=item Alternative RE syntax module
+
=item Safe signal handling
=item Tie Modules
=item IEEE-format Floating Point Default on OpenVMS Alpha
-=item Different Definition of the Unicode Character Classes \p{In...}
+=item New Unicode Properties
=item Perl Parser Stress Tested
=item Understanding of Numbers
-=item Miscellaneous Enhancements
+=item Miscellaneous Changes
=back
=back
-=head2 perl561delta, perldelta - what's new for perl v5.6.x
+=head2 perl561delta - what's new for perl v5.6.x
=over 4
=back
-=head2 perl56delta, perldelta - what's new for perl v5.6.0
+=head2 perl56delta - what's new for perl v5.6.0
=over 4
=back
-=head2 perl5005delta, perldelta - what's new for perl5.005
+=head2 perl5005delta - what's new for perl5.005
=over 4
=back
-=head2 perl5004delta, perldelta - what's new for perl5.004
+=head2 perl5004delta - what's new for perl5.004
=over 4
=item B::PV METHODS
-PV, PVX
+PV, RV, PVX
=item B::PVMG METHODS
=item B::MAGIC METHODS
-MOREMAGIC, PRIVATE, TYPE, FLAGS, OBJ, PTR
+MOREMAGIC, precomp, PRIVATE, TYPE, FLAGS, OBJ, PTR, REGEX
=item B::PVLV METHODS
=item B::IO METHODS
LINES, PAGE, PAGE_LEN, LINES_LEFT, TOP_NAME, TOP_GV, FMT_NAME, FMT_GV,
-BOTTOM_NAME, BOTTOM_GV, SUBPROCESS, IoTYPE, IoFLAGS
+BOTTOM_NAME, BOTTOM_GV, SUBPROCESS, IoTYPE, IoFLAGS, IsSTD
=item B::AV METHODS
=item B::PMOP METHODS
-pmreplroot, pmreplstart, pmnext, pmregexp, pmflags, pmpermflags, precomp
+pmreplroot, pmreplstart, pmnext, pmregexp, pmflags, pmdynflags,
+pmpermflags, precomp, pmoffet
=item B::SVOP METHOD
=item FUNCTIONS EXPORTED BY C<B>
-main_cv, init_av, main_root, main_start, comppadlist, sv_undef, sv_yes,
-sv_no, amagic_generation, walkoptree(OP, METHOD), walkoptree_debug(DEBUG),
-walksymtable(SYMREF, METHOD, RECURSE, PREFIX), svref_2object(SV),
-ppname(OPNUM), hash(STR), cast_I32(I), minus_c, cstring(STR), class(OBJ),
-threadsv_names
+main_cv, init_av, begin_av, end_av, main_root, main_start, comppadlist,
+regex_padav, sv_undef, sv_yes, sv_no, amagic_generation, walkoptree(OP,
+METHOD), walkoptree_debug(DEBUG), walksymtable(SYMREF, METHOD, RECURSE,
+PREFIX), svref_2object(SV), ppname(OPNUM), hash(STR), cast_I32(I), minus_c,
+cstring(STR), class(OBJ), threadsv_names
=item AUTHOR
B<-ofilename>, B<-v>, B<-->, B<-uPackname>, B<-D>, B<-Do>, B<-Dc>, B<-DA>,
B<-DC>, B<-DM>, B<-f>, B<-fcog>, B<-fsave-data>, B<-fppaddr>, B<-fwarn-sv>,
-B<-fuse-script-name>, B<-fsave-sig-hash>, B<-On>, B<-llimit>
+B<-fuse-script-name>, B<-fsave-sig-hash>, B<-On>, B<-O0>, B<-O1>, B<-O2>,
+B<-llimit>
=item EXAMPLES
=item USING THE FUNCTION-ORIENTED INTERFACE
-B<:cgi>, B<:form>, B<:html2>, B<:html3>, B<:netscape>, B<:html>,
+B<:cgi>, B<:form>, B<:html2>, B<:html3>, B<:html4>, B<:netscape>, B<:html>,
B<:standard>, B<:all>
=item PRAGMAS
=item SPECIAL FORMS FOR IMPORTING HTML-TAG FUNCTIONS
-1. start_table() (generates a <TABLE> tag), 2. end_table() (generates a
-</TABLE> tag), 3. start_ul() (generates a <UL> tag), 4. end_ul() (generates
-a </UL> tag)
+1. start_table() (generates a <table> tag), 2. end_table() (generates a
+</table> tag), 3. start_ul() (generates a <ul> tag), 4. end_ul() (generates
+a </ul> tag)
=back
1. Create a <Frameset> document, 2. Specify the destination for the
document in the HTTP header, 3. Specify the destination for the document in
-the <FORM> tag
+the <form> tag
=item LIMITED SUPPORT FOR CASCADING STYLE SHEETS
=item Selecting What To Export
+=item How to Import
+
+C<use ModuleName;>, C<use ModuleName ();>, C<use ModuleName qw(...);>
+
+=back
+
+=item Advanced features
+
+=over 4
+
=item Specialised Import Lists
-=item Exporting without using Export's import method
+=item Exporting without using Exporter's import method
=item Module Version Checking
=back
+=head2 ExtUtils::MM_BeOS - methods to override UN*X behaviour in
+ExtUtils::MakeMaker
+
+=over 4
+
+=item SYNOPSIS
+
+=item DESCRIPTION
+
+=back
+
+perl_archive
+
=head2 ExtUtils::MM_Cygwin - methods to override UN*X behaviour in
ExtUtils::MakeMaker
=back
-=head2 File::Find, find - traverse a file tree
+=head2 File::Find - Traverse a directory tree.
=over 4
=item DESCRIPTION
+B<find>, B<finddepth>
+
+=over 4
+
+=item %options
+
C<wanted>, C<bydepth>, C<preprocess>, C<postprocess>, C<follow>,
C<follow_fast>, C<follow_skip>, C<dangling_symlinks>, C<no_chdir>,
C<untaint>, C<untaint_pattern>, C<untaint_skip>
+=item The wanted function
+
+C<$File::Find::dir> is the current directory name,, C<$_> is the current
+filename within that directory, C<$File::Find::name> is the complete
+pathname to the file
+
+=back
+
=item WARNINGS
=item CAVEAT
first BLOCK LIST, max LIST, maxstr LIST, min LIST, minstr LIST, reduce
BLOCK LIST, shuffle LIST, sum LIST
+=item KNOWN BUGS
+
=item SUGGESTED ADDITIONS
=item COPYRIGHT
first BLOCK LIST, max LIST, maxstr LIST, min LIST, minstr LIST, reduce
BLOCK LIST, shuffle LIST, sum LIST
+=item KNOWN BUGS
+
=item SUGGESTED ADDITIONS
=item COPYRIGHT
blessed EXPR, dualvar NUM, STRING, isweak EXPR, readonly SCALAR, reftype
EXPR, tainted EXPR, weaken REF
+=item KNOWN BUGS
+
=item COPYRIGHT
=item BLATANT PLUG
blessed EXPR, dualvar NUM, STRING, isweak EXPR, readonly SCALAR, reftype
EXPR, tainted EXPR, weaken REF
+=item KNOWN BUGS
+
=item COPYRIGHT
=item BLATANT PLUG
=item DESCRIPTION
inet_aton HOSTNAME, inet_ntoa IP_ADDRESS, INADDR_ANY, INADDR_BROADCAST,
-INADDR_LOOPBACK, INADDR_NONE, sockaddr_in PORT, ADDRESS, sockaddr_in
-SOCKADDR_IN, pack_sockaddr_in PORT, IP_ADDRESS, unpack_sockaddr_in
-SOCKADDR_IN, sockaddr_un PATHNAME, sockaddr_un SOCKADDR_UN,
-pack_sockaddr_un PATH, unpack_sockaddr_un SOCKADDR_UN
+INADDR_LOOPBACK, INADDR_NONE, sockaddr_family SOCKADDR, sockaddr_in PORT,
+ADDRESS, sockaddr_in SOCKADDR_IN, pack_sockaddr_in PORT, IP_ADDRESS,
+unpack_sockaddr_in SOCKADDR_IN, sockaddr_un PATHNAME, sockaddr_un
+SOCKADDR_UN, pack_sockaddr_un PATH, unpack_sockaddr_un SOCKADDR_UN
=back
=back
+=item Storable magic
+
=item EXAMPLES
=item WARNING
B<is_eq>, B<is_num>
-B<like>
+B<isnt_eq>, B<isnt_num>
+
+B<like>, B<unlike>
+
+B<cmp_ok>
+
+B<BAILOUT>
B<skip>
+B<todo_skip>
+
B<skip_rest>
=over 4
=item The test script output
-B<'1..M'>, B<'ok', 'not ok'. Ok?>, B<test numbers>,
-B<$Test::Harness::verbose>, B<$Test::Harness::switches>, B<Skipping tests>,
-B<Todo tests>, B<Bail out!>, B<Comments>, B<Anything else>
+B<'1..M'>, B<'ok', 'not ok'. Ok?>, B<test numbers>, B<test names>,
+B<Skipping tests>, B<Todo tests>, B<Bail out!>, B<Comments>, B<Anything
+else>
+
+=item Taint mode
+
+=item Configuration variables.
+
+B<$Test::Harness::verbose>, B<$Test::Harness::switches>
=item Failure
B<_mk_leader>
+B<_leader_width>
+
=over 4
=item EXPORT
=back
+=head2 Test::Harness::Assert - simple assert
+
+=over 4
+
+=item SYNOPSIS
+
+=item DESCRIPTION
+
+=over 4
+
+=item Functions
+
+B<assert>
+
+=back
+
+=back
+
+=over 4
+
+=item AUTHOR
+
+=item SEE ALSO
+
+=back
+
+=head2 Test::Harness::Iterator - Internal Test::Harness Iterator
+
+=over 4
+
+=item SYNOPSIS
+
+=item DESCRIPTION
+
+=back
+
+=head2 Test::Harness::Straps - detailed analysis of test results
+
+=over 4
+
+=item SYNOPSIS
+
+=item DESCRIPTION
+
+=over 4
+
+=item Construction
+
+B<new>
+
+=back
+
+=back
+
+B<_init>
+
+=over 4
+
+=item Analysis
+
+B<analyze>
+
+=back
+
+B<analyze_fh>
+
+B<analyze_file>
+
+B<_switches>
+
+B<_INC2PERL5LIB>
+
+B<_filtered_INC>
+
+B<_restore_PERL5LIB>
+
+=over 4
+
+=item Parsing
+
+B<_is_comment>
+
+=back
+
+B<_is_header>
+
+B<_is_test>
+
+B<_is_bail_out>
+
+B<_reset_file_state>
+
+=over 4
+
+=item Results
+
+B<_detailize>
+
+=back
+
+=over 4
+
+=item EXAMPLES
+
+=item AUTHOR
+
+=item SEE ALSO
+
+=back
+
=head2 Test::More - yet another framework for writing test scripts
=over 4
B<like>
+B<unlike>
+
+B<cmp_ok>
+
B<can_ok>
B<isa_ok>
=over 4
+=item Diagnostics
+
+B<diag>
+
+=back
+
+=over 4
+
=item Module tests
B<use_ok>
=back
-B<TODO: BLOCK>
+B<TODO: BLOCK>, B<todo_skip>
=over 4
=over 4
+=item Extending and Embedding Test::More
+
+B<builder>
+
+=back
+
+=over 4
+
=item NOTES
=item BUGS and CAVEATS
-Making your own ok(), The eq_* family have some caveats, Test::Harness
+Making your own ok(), The eq_* family has some caveats, Test::Harness
upgrades
=item HISTORY
=item DESCRIPTION
+=over 4
+
+=item Normalization Forms
+
C<$string_NFD = NFD($raw_string)>, C<$string_NFC = NFC($raw_string)>,
C<$string_NFKD = NFKD($raw_string)>, C<$string_NFKC = NFKC($raw_string)>,
C<$normalized_string = normalize($form_name, $raw_string)>
-=over 4
+=item Character Data
+
+C<$canonical_decomposed = getCanon($codepoint)>,
+C<$compatibility_decomposed = getCompat($codepoint)>, C<$uv_composite =
+getComposite($uv_here, $uv_next)>, C<$combining_class =
+getCombinClass($codepoint)>, C<$is_exclusion = isExclusion($codepoint)>
=item EXPORT
=item SEE ALSO
-L<Lingua::KO::Hangul::Util>, http://www.unicode.org/unicode/reports/tr15/
+http://www.unicode.org/unicode/reports/tr15/
=back