summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2021-01-18 19:37:54 -0700
committerJames E Keenan <jkeenan@cpan.org>2021-02-06 08:54:48 -0500
commit9b2803fee032f0a952408878751162d1b5c3f369 (patch)
tree85ac3cd1f95604953e54045c49fcdc48ac5b8869 /t
parent6dc0bc881744f14c1fbf317c1ba4502e96b861bc (diff)
downloadperl-9b2803fee032f0a952408878751162d1b5c3f369.tar.gz
Prepare reg_mesg.t for warnings enabled upon invocation
Since some of the tests in this file test for default warning behavior, it must set the warnings to the defaults.
Diffstat (limited to 't')
-rw-r--r--t/re/reg_mesg.t6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t
index 0902224ef4..6fce6e6e2b 100644
--- a/t/re/reg_mesg.t
+++ b/t/re/reg_mesg.t
@@ -14,6 +14,12 @@ skip_all_without_unicode_tables();
use strict;
use open qw(:utf8 :std);
+# Show that it works when all warnings are enabled upon invocation. This file
+# includes tests that the default warnings are enabled by default, and the
+# non-default ones aren't.
+use warnings;
+BEGIN { ${^WARNING_BITS} = undef } # Kludge to restore default warnings
+
# Kind of a kludge to mark warnings to be expected only if we are testing
# under "use re 'strict'"
my $only_strict_marker = ':expected_only_under_strict';