From: Duke Leto Date: Sun, 14 Jun 2009 19:34:55 +0000 (-0700) Subject: Add a test to the debugger about not having threads X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9c955c4d43e6b85fa829444681b37167f0dea301;p=p5sagit%2Fp5-mst-13.2.git Add a test to the debugger about not having threads --- diff --git a/lib/perl5db.t b/lib/perl5db.t index c52ae76..d5747cf 100755 --- a/lib/perl5db.t +++ b/lib/perl5db.t @@ -27,7 +27,7 @@ my $dev_tty = '/dev/tty'; } } -plan(4); +plan(5); sub rc { open RC, ">", ".perldb" or die $!; @@ -91,6 +91,16 @@ like($contents, qr/sub factorial/, { if ( $Config{usethreads} ) { + skip('This perl has threads, skipping non-threaded debugger tests'); + } else { + my $error = 'This Perl not built to support threads'; + my $output = runperl( switches => [ '-dt' ] ); + like($output, qr/$error/, 'Perl debugger correctly complains that it was not built with threads'); + } + +} +{ + if ( $Config{usethreads} ) { local $ENV{PERLDB_OPTS} = "ReadLine=0 NonStop=1"; my $output = runperl(switches => [ '-dt' ], progfile => '../lib/perl5db/t/symbol-table-bug'); like($output, qr/Undefined symbols 0/, 'there are no undefined values in the symbol table when running with thread support');