1b39c5158Smillert# fcodes E
2b39c5158Smillertuse strict;
3256a93a4Safresh1use warnings;
4*5486feefSafresh1use Test::More tests => 18;
5b39c5158Smillert
6256a93a4Safresh1BEGIN {
7256a93a4Safresh1  require FindBin;
8256a93a4Safresh1  unshift @INC, $FindBin::Bin . '/lib';
9256a93a4Safresh1}
10*5486feefSafresh1use helpers;
11b39c5158Smillert
12*5486feefSafresh1#use Pod::Simple::Debug (6);
13b39c5158Smillert
14b39c5158Smillertuse Pod::Simple::DumpAsXML;
15b39c5158Smillertuse Pod::Simple::XMLOutStream;
16b39c5158Smillert
17b39c5158Smillertprint "# Pod::Simple version $Pod::Simple::VERSION\n";
18b39c5158Smillert
19b39c5158Smillertprint "# Pod::Escapes version $Pod::Escapes::VERSION\n",
20b39c5158Smillert if $Pod::Escapes::VERSION;
21b39c5158Smillert# Presumably that's the library being used
22b39c5158Smillert
23*5486feefSafresh1&is( e "", "" );
24*5486feefSafresh1&is( e "\n", "", );
25b39c5158Smillert
26b39c5158Smillert
27b39c5158Smillertprint "# Testing some basic mnemonic E sequences...\n";
28b39c5158Smillert
29*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<lt>2\n"),
30b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1<2")
31b39c5158Smillert);
32*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<gt>2\n"),
33b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1>2")
34b39c5158Smillert);
35*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<verbar>2\n"),
36b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1|2")
37b39c5158Smillert);
38*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<sol>2\n"),
39b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1/2\n")
40b39c5158Smillert);
41b39c5158Smillert
42b39c5158Smillert
43b39c5158Smillertprint "# Testing some more mnemonic E sequences...\n";
44b39c5158Smillert
45*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<apos>2\n"),
46b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1'2")
47b39c5158Smillert);
48*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<quot>2\n"),
49b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1\"2")
50b39c5158Smillert);
51*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1&2"),
52b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1E<amp>2\n")
53b39c5158Smillert);
54*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<eacute>2"),
55b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1E<233>2\n")
56b39c5158Smillert);
57*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<infin>2"),
58b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1E<8734>2\n")
59b39c5158Smillert);
60b39c5158Smillert
61*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<lchevron>2"),
62b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1E<171>2\n")
63b39c5158Smillert);
64*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<rchevron>2"),
65b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1E<187>2\n")
66b39c5158Smillert);
67*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<laquo>2"),
68b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1E<171>2\n")
69b39c5158Smillert);
70*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<raquo>2"),
71b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1E<187>2\n")
72b39c5158Smillert);
73b39c5158Smillert
74b39c5158Smillert
75b39c5158Smillert
76b39c5158Smillertprint "# Testing numeric E sequences...\n";
77*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<0101>2\n"),
78b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1A2")
79b39c5158Smillert);
80*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<65>2\n"),
81b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1A2")
82b39c5158Smillert);
83*5486feefSafresh1&is( Pod::Simple::XMLOutStream->_out("=pod\n\n1E<0x41>2\n"),
84b39c5158Smillert     Pod::Simple::XMLOutStream->_out("=pod\n\n1A2")
85b39c5158Smillert);
86