}
use strict;
-plan( tests => 120 );
+plan( tests => 122 );
run_tests() unless caller;
is($^A, 'bang', "formline isn't confused by index compilation");
is(index('bang', PVBM2), 0, "index isn't confused by format compilation");
+{
+ use constant perl => "rules";
+ is(index("perl rules", perl), 5, 'first index of a constant works');
+ is(index("rules 1 & 2", perl), 0, 'second index of the same constant works');
+}
+
}
if (SvSCREAM(sv))
return;
+ if (SvVALID(sv))
+ return;
+
if (flags & FBMcf_TAIL) {
MAGIC * const mg = SvUTF8(sv) && SvMAGICAL(sv) ? mg_find(sv, PERL_MAGIC_utf8) : NULL;
sv_catpvs(sv, "\n"); /* Taken into account in fbm_instr() */