summaryrefslogtreecommitdiff
path: root/lib/Pod/Simple/t/encod03.t
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2007-03-23 01:43:11 +0000
committerSteve Peters <steve@fisharerojo.org>2007-03-23 01:43:11 +0000
commit4f90f8a54e3419c3cfd886662db5eccd3cfbf5fd (patch)
tree9dc10a8290a799fe9e72730e772804aa250f63f9 /lib/Pod/Simple/t/encod03.t
parentc3259e746e9a16eaab56dc090af25ee8b1dccf28 (diff)
downloadperl-4f90f8a54e3419c3cfd886662db5eccd3cfbf5fd.tar.gz
Upgrade to Pod-Simple-3.05.
p4raw-id: //depot/perl@30706
Diffstat (limited to 'lib/Pod/Simple/t/encod03.t')
-rw-r--r--lib/Pod/Simple/t/encod03.t76
1 files changed, 76 insertions, 0 deletions
diff --git a/lib/Pod/Simple/t/encod03.t b/lib/Pod/Simple/t/encod03.t
new file mode 100644
index 0000000000..a058ce7b84
--- /dev/null
+++ b/lib/Pod/Simple/t/encod03.t
@@ -0,0 +1,76 @@
+BEGIN {
+ if($ENV{PERL_CORE}) {
+ chdir 't';
+ @INC = '../lib';
+ }
+}
+
+use strict;
+use Test;
+BEGIN { plan tests => 4 };
+
+#use Pod::Simple::Debug (5);
+
+ok 1;
+
+use Pod::Simple::DumpAsXML;
+use Pod::Simple::XMLOutStream;
+print "# Pod::Simple version $Pod::Simple::VERSION\n";
+
+{
+my @output_lines = split m/[\cm\cj]+/, Pod::Simple::XMLOutStream->_out( q{
+
+=encoding koi8-r
+
+=head1 NAME
+
+Bippitty Boppity Boo -- Yormp
+
+=cut
+
+} );
+
+
+if(grep m/Unknown directive/i, @output_lines ) {
+ ok 0;
+ print "# I saw an Unknown directive warning here! :\n",
+ map("#==> $_\n", @output_lines), "#\n#\n";
+} else {
+ ok 1;
+}
+
+}
+
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+print "# Now a control group, to make sure that =fishbladder DOES\n",
+ "# cause an 'unknown directive' error...\n";
+
+{
+my @output_lines = split m/[\cm\cj]+/, Pod::Simple::XMLOutStream->_out( q{
+
+=fishbladder
+
+=head1 NAME
+
+Fet's "When you were reading"
+
+=cut
+
+} );
+
+
+if(grep m/Unknown directive/i, @output_lines ) {
+ ok 1;
+} else {
+ ok 0;
+ print "# But I didn't see an Unknows directive warning here! :\n",
+ map("#==> $_\n", @output_lines), "#\n#\n";
+}
+
+}
+
+
+
+print "#\n# And one for the road...\n";
+ok 1;
+