clean up debugger environment before testing with it
[p5sagit/namespace-clean.git] / t / 07-debugger.t
index 9e72122..c52c34a 100644 (file)
@@ -9,18 +9,24 @@ BEGIN {
   ) {
     plan skip_all => $missing_xs;
   }
+  else {
+    plan tests => 4;
+  }
 }
 
 BEGIN {
   # shut up the debugger
-  $ENV{PERLDB_OPTS} = 'NonStop';
+  delete $ENV{$_} for grep /^PERL5?DB/, keys %ENV;
+  delete $ENV{LOGDIR};
+  $ENV{HOME} = '.';
+  $ENV{PERLDB_OPTS} = 'NonStop noTTY';
 }
 
 BEGIN {
 
 #line 1
 #!/usr/bin/perl -d
-#line 10
+#line 30
 
 }
 
@@ -42,5 +48,3 @@ ok( !Foo->can("foo"), "foo cleaned up" );
 ok( !Foo->can("baz"), "baz cleaned up" );
 
 Foo->bar();
-
-done_testing;