1 # Testing hardening fullstop spaces
11 BEGIN { plan tests => 11 };
13 #use Pod::Simple::Debug (6);
15 print "# Hi, I'm ", __FILE__, "\n";
19 use Pod::Simple::DumpAsXML;
20 use Pod::Simple::XMLOutStream;
21 print "# Pod::Simple version $Pod::Simple::VERSION\n";
22 sub e ($$) { Pod::Simple::DumpAsXML->_duo(@_) }
27 die unless ok !! Pod::Simple::XMLOutStream->can('fullstop_space_harden');
28 sub harden { $_[0]->fullstop_space_harden(1) }
30 print "# Test that \". \" always compacts without the hardening on...\n";
32 ok( Pod::Simple::XMLOutStream->_out("\n=pod\n\nShe set me a message about the M.D. I\ncalled back!\n"),
33 qq{<Document><Para>She set me a message about the M.D. I called back!</Para></Document>}
35 ok( Pod::Simple::XMLOutStream->_out("\n=pod\n\nShe set me a message about the M.D. I called back!\n"),
36 qq{<Document><Para>She set me a message about the M.D. I called back!</Para></Document>}
38 ok( Pod::Simple::XMLOutStream->_out("\n=pod\n\nShe set me a message about the M.D.\nI called back!\n"),
39 qq{<Document><Para>She set me a message about the M.D. I called back!</Para></Document>}
43 print "# Now testing with the hardening on...\n";
45 ok( Pod::Simple::XMLOutStream->_out(\&harden, "\n=pod\n\nShe set me a message about the M.D. I\ncalled back!\n"),
46 qq{<Document><Para>She set me a message about the M.D.  I called back!</Para></Document>}
48 ok( Pod::Simple::XMLOutStream->_out(\&harden, "\n=pod\n\nShe set me a message about the M.D. I called back!\n"),
49 qq{<Document><Para>She set me a message about the M.D. I called back!</Para></Document>}
51 ok( Pod::Simple::XMLOutStream->_out(\&harden, "\n=pod\n\nShe set me a message about the M.D.\nI called back!\n"),
52 qq{<Document><Para>She set me a message about the M.D. I called back!</Para></Document>}