10 BEGIN { plan tests => 11 };
12 #use Pod::Simple::Debug (6);
14 print "# Hi, I'm ", __FILE__, "\n";
18 use Pod::Simple::DumpAsXML;
19 use Pod::Simple::XMLOutStream;
20 print "# Pod::Simple version $Pod::Simple::VERSION\n";
21 sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) }
26 die unless ok !! Pod::Simple::XMLOutStream->can('fullstop_space_harden');
27 sub harden { $_[0]->fullstop_space_harden(1) }
29 print "# Test that \". \" always compacts without the hardening on...\n";
31 ok( Pod::Simple::XMLOutStream->_out("\n=pod\n\nShe set me a message about the M.D. I\ncalled back!\n"),
32 qq{<Document><Para>She set me a message about the M.D. I called back!</Para></Document>}
34 ok( Pod::Simple::XMLOutStream->_out("\n=pod\n\nShe set me a message about the M.D. I called back!\n"),
35 qq{<Document><Para>She set me a message about the M.D. I called back!</Para></Document>}
37 ok( Pod::Simple::XMLOutStream->_out("\n=pod\n\nShe set me a message about the M.D.\nI called back!\n"),
38 qq{<Document><Para>She set me a message about the M.D. I called back!</Para></Document>}
42 print "# Now testing with the hardening on...\n";
44 ok( Pod::Simple::XMLOutStream->_out(\&harden, "\n=pod\n\nShe set me a message about the M.D. I\ncalled back!\n"),
45 qq{<Document><Para>She set me a message about the M.D.  I called back!</Para></Document>}
47 ok( Pod::Simple::XMLOutStream->_out(\&harden, "\n=pod\n\nShe set me a message about the M.D. I called back!\n"),
48 qq{<Document><Para>She set me a message about the M.D. I called back!</Para></Document>}
50 ok( Pod::Simple::XMLOutStream->_out(\&harden, "\n=pod\n\nShe set me a message about the M.D.\nI called back!\n"),
51 qq{<Document><Para>She set me a message about the M.D. I called back!</Para></Document>}