diff options
Diffstat (limited to 't/comp')
-rw-r--r-- | t/comp/hints.t | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/t/comp/hints.t b/t/comp/hints.t index d15a44a4e8..32267dee90 100644 --- a/t/comp/hints.t +++ b/t/comp/hints.t @@ -12,8 +12,13 @@ BEGIN { print "1..15\n"; } BEGIN { print "not " if exists $^H{foo}; print "ok 1 - \$^H{foo} doesn't exist initially\n"; - print "not " if $^H & 0x00020000; - print "ok 2 - \$^H doesn't contain HINT_LOCALIZE_HH initially\n"; + if (${^OPEN}) { + print "not " unless $^H & 0x00020000; + print "ok 2 - \$^H contains HINT_LOCALIZE_HH initially with ${^OPEN}\n"; + } else { + print "not " if $^H & 0x00020000; + print "ok 2 - \$^H doesn't contain HINT_LOCALIZE_HH initially\n"; + } } { # simulate a pragma -- don't forget HINT_LOCALIZE_HH @@ -40,13 +45,23 @@ BEGIN { CHECK { print "not " if exists $^H{foo}; print "ok 9 - \$^H{foo} doesn't exist when compilation complete\n"; - print "not " if $^H & 0x00020000; - print "ok 10 - \$^H doesn't contain HINT_LOCALIZE_HH when compilation complete\n"; + if (${^OPEN}) { + print "not " unless $^H & 0x00020000; + print "ok 10 - \$^H contains HINT_LOCALIZE_HH when compilation complete with ${^OPEN}\n"; + } else { + print "not " if $^H & 0x00020000; + print "ok 10 - \$^H doesn't contain HINT_LOCALIZE_HH when compilation complete\n"; + } } print "not " if exists $^H{foo}; print "ok 11 - \$^H{foo} doesn't exist at runtime\n"; - print "not " if $^H & 0x00020000; - print "ok 12 - \$^H doesn't contain HINT_LOCALIZE_HH at run-time\n"; + if (${^OPEN}) { + print "not " unless $^H & 0x00020000; + print "ok 12 - \$^H contains HINT_LOCALIZE_HH at run-time with ${^OPEN}\n"; + } else { + print "not " if $^H & 0x00020000; + print "ok 12 - \$^H doesn't contain HINT_LOCALIZE_HH at run-time\n"; + } # op_entereval should keep the pragmas it was compiled with eval q* print "not " if $^H{foo} ne "a"; @@ -58,8 +73,13 @@ BEGIN { BEGIN { print "not " if exists $^H{foo}; print "ok 7 - \$^H{foo} doesn't exist while finishing compilation\n"; - print "not " if $^H & 0x00020000; - print "ok 8 - \$^H doesn't contain HINT_LOCALIZE_HH while finishing compilation\n"; + if (${^OPEN}) { + print "not " unless $^H & 0x00020000; + print "ok 8 - \$^H contains HINT_LOCALIZE_HH while finishing compilation with ${^OPEN}\n"; + } else { + print "not " if $^H & 0x00020000; + print "ok 8 - \$^H doesn't contain HINT_LOCALIZE_HH while finishing compilation\n"; + } } require 'test.pl'; |