Remove obsolete details on how to format a patch. Just point to perlrepository instead.
[p5sagit/p5-mst-13.2.git] / t / run / switches.t
index e62eda4..8e076d4 100644 (file)
@@ -11,7 +11,7 @@ BEGIN {
 
 BEGIN { require "./test.pl"; }
 
-plan(tests => 70);
+plan(tests => 71);
 
 use Config;
 
@@ -193,6 +193,9 @@ SWTESTPM
     is( $r, "<$package><foo><bar>", '-m with import parameters' );
     push @tmpfiles, $filename;
 
+  {
+    local $TODO = '';  # these work on VMS
+
     is( runperl( switches => [ '-MTie::Hash' ], stderr => 1, prog => 1 ),
          '', "-MFoo::Bar allowed" );
 
@@ -220,6 +223,7 @@ SWTESTPM
                   prog => 'die "oops"' ),
          qr/Module name required with -M option\b/,
          "-M- not allowed" );
+  }  # disable TODO on VMS
 }
 
 # Tests for -V
@@ -260,10 +264,11 @@ SWTESTPM
 
 {
     local $TODO = '';   # these ones should work on VMS
-
+    # there are definitely known build configs where this test will fail
+    # DG/UX comes to mind. Maybe we should remove these special cases?
     my $v = sprintf "%vd", $^V;
     like( runperl( switches => ['-v'] ),
-         qr/This is perl, v$v (?:DEVEL\d+ )?built for \Q$Config{archname}\E.+Copyright.+Larry Wall.+Artistic License.+GNU General Public License/s,
+         qr/This is perl, v\Q$v\E(?:[-*\w]+| \([^)]+\))? built for \Q$Config{archname}\E.+Copyright.+Larry Wall.+Artistic License.+GNU General Public License/s,
           '-v looks okay' );
 
 }
@@ -329,6 +334,8 @@ __EOF__
 
 # Tests for -E
 
+$TODO = '';  # the -E tests work on VMS
+
 $r = runperl(
     switches   => [ '-E', '"say q(Hello, world!)"']
 );
@@ -351,6 +358,11 @@ $r = runperl(
 );
 is( $r, "affe\n", '-E works outside of the block created by -n' );
 
+$r = runperl(
+    switches   => [ '-E', q("*{'bar'} = sub{}; print 'Hello, world!',qq|\n|;")]
+);
+is( $r, "Hello, world!\n", "-E does not enable strictures" );
+
 # RT #30660
 
 $filename = tempfile();