Integrate macperl patch #16868.
[p5sagit/p5-mst-13.2.git] / ext / B / t / terse.t
index c586c09..1ad61b1 100644 (file)
@@ -78,13 +78,22 @@ sub bar {
 
        # make a PV
        $foo = "a string";
+
+       # make an OP_SUBSTCONT
+       $foo =~ s/(a)/$1/;
 }
 
-# Schwern's example of finding an RV
-my $path = join " ", map { qq["-I$_"] } @INC;
-my $redir = $^O eq 'MacOS' ? '' : "2>&1";
-my $items = qx{$^X $path "-MO=Terse" -le "print \\42" $redir};
-like( $items, qr/RV $hex \\42/, 'RV' );
+SKIP: {
+    use Config;
+    skip("- B::Terse won't grok RVs under ithreads yet", 1)
+       if $Config{useithreads};
+    # Schwern's example of finding an RV
+    my $path = join " ", map { qq["-I$_"] } @INC;
+    $path = '-I::lib -MMac::err=unix' if $^O eq 'MacOS';
+    my $redir = $^O eq 'MacOS' ? '' : "2>&1";
+    my $items = qx{$^X $path "-MO=Terse" -le "print \\42" $redir};
+    like( $items, qr/RV $hex \\42/, 'RV' );
+}
 
 package TieOut;