summaryrefslogtreecommitdiff
path: root/t/43options.t
diff options
context:
space:
mode:
Diffstat (limited to 't/43options.t')
-rw-r--r--t/43options.t21
1 files changed, 12 insertions, 9 deletions
diff --git a/t/43options.t b/t/43options.t
index 826f0ad..d46fe23 100644
--- a/t/43options.t
+++ b/t/43options.t
@@ -3,7 +3,7 @@
use strict;
use warnings;
-use Test::More tests => 290;
+use Test::More tests => 291;
use XML::LibXML;
@@ -50,7 +50,7 @@ no_network
{
my $p = XML::LibXML->new();
for my $opt (@all) {
- my $ret = (($opt =~ /^(?:load_ext_dtd|expand_entities)$/) ? 1 : 0);
+ my $ret = 0;
# TEST*$all
ok(
($p->get_option($opt)||0) == $ret
@@ -110,18 +110,21 @@ no_network
ok( $p->get_option('recover') == 2, ' TODO : Add test name' );
# TEST
- ok( $p->expand_entities() == 1, ' TODO : Add test name' );
+ ok( $p->expand_entities() == 0, 'expand_entities should default to false' );
# TEST
- ok( $p->load_ext_dtd() == 1, ' TODO : Add test name' );
+ ok( $p->load_ext_dtd() == 0, 'load_ext_dtd should default to false' );
+ $p->load_ext_dtd(1);
+ # TEST
+ ok( $p->load_ext_dtd() == 1, 'load_ext_dtd should be true after being set to true' );
$p->load_ext_dtd(0);
+ $p->expand_entities(1);
# TEST
- ok( $p->load_ext_dtd() == 0, ' TODO : Add test name' );
- $p->expand_entities(0);
+ ok( $p->expand_entities() == 1, 'expand_entities should be true after being set to true' );
# TEST
- ok( $p->expand_entities() == 0, ' TODO : Add test name' );
- $p->expand_entities(1);
+ ok( $p->load_ext_dtd() == 1, 'load_ext_dtd should be true after expand_entities is set to true' );
+ $p->expand_entities(0);
# TEST
- ok( $p->expand_entities() == 1, ' TODO : Add test name' );
+ ok( $p->expand_entities() == 0, 'expand_entities should be false after being set to false' );
}
{