if (has_charset_modifier || flagsp == &negflags) {
goto fail_modifiers;
}
- *flagsp &= ~RXf_PMf_UNICODE;
- *flagsp |= RXf_PMf_LOCALE;
+ posflags |= RXf_PMf_LOCALE;
+ negflags |= RXf_PMf_UNICODE;
has_charset_modifier = 1;
break;
case UNICODE_PAT_MOD:
if (has_charset_modifier || flagsp == &negflags) {
goto fail_modifiers;
}
- *flagsp &= ~RXf_PMf_LOCALE;
- *flagsp |= RXf_PMf_UNICODE;
+ posflags |= RXf_PMf_UNICODE;
+ negflags |= RXf_PMf_LOCALE;
has_charset_modifier = 1;
break;
case DUAL_PAT_MOD:
{
goto fail_modifiers;
}
- *flagsp &= ~(RXf_PMf_LOCALE|RXf_PMf_UNICODE);
+ negflags |= (RXf_PMf_LOCALE|RXf_PMf_UNICODE);
has_charset_modifier = 1;
break;
case ONCE_PAT_MOD: /* 'o' */
}
-plan tests => 406; # Update this when adding/deleting tests.
+plan tests => 408; # Update this when adding/deleting tests.
run_tests() unless caller;
ok $c =~ /$utf8_pattern/i, "\\xc0 =~ /$pattern/i; Both target and pattern utf8";
}
+ SKIP: { # Make sure can override the formatting
+ if ($IS_EBCDIC) {
+ skip "Needs to be customized to run on EBCDIC", 2;
+ }
+ use feature 'unicode_strings';
+ ok "\xc0" =~ /\w/, 'Under unicode_strings: "\xc0" =~ /\w/';
+ ok "\xc0" !~ /(?d:\w)/, 'Under unicode_strings: "\xc0" !~ /(?d:\w)/';
+ }
+
{
# Test that a regex followed by an operator and/or a statement modifier work
# These tests use string-eval so that it reports a clean error when it fails