~ubuntu-branches/ubuntu/trusty/librose-object-perl/trusty-proposed

« back to all changes in this revision

Viewing changes to xt/debugger.t

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Yu
  • Date: 2010-02-11 21:27:22 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20100211212722-wsb9vv3afszkk0xe
Tags: 0.858-1
* New upstream release
* Standards-Version 3.8.4 (no changes)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/perl -d
 
2
 
 
3
use Test::More tests => 1;
 
4
 
 
5
# XXX: Code taken from namespace::clean's t/07--debugger.t
 
6
BEGIN
 
7
{
 
8
  no warnings 'once';
 
9
 
 
10
  # Apparently we can't just skip_all with -d, because the 
 
11
  # debugger breaks at Test::Testers END block.
 
12
  if($] <= 5.010000)
 
13
  {
 
14
    pass;
 
15
    done_testing;
 
16
  }
 
17
  else
 
18
  {
 
19
    push(@DB::typeahead, 'c');
 
20
  }
 
21
 
 
22
  push(@DB::typeahead, 'q');
 
23
 
 
24
  open(my $out, '>', \my $out_buf) or warn "Could not open new out handle - $!";
 
25
  $DB::OUT = $out;
 
26
  open(my $in, '<', \my $in_buf)  or warn "Could not open new in handle - $!";
 
27
  $DB::IN = $in;
 
28
}
 
29
 
 
30
use FindBin qw($Bin);
 
31
 
 
32
use lib "$Bin/lib";
 
33
 
 
34
require Person1;
 
35
 
 
36
delete $INC{'Person1.pm'};
 
37
 
 
38
eval { require Person1 };
 
39
 
 
40
ok(!$@, 'double load');
 
41
 
 
42
done_testing;