diff options
author | Duke Leto <jonathan@leto.net> | 2009-06-14 12:34:55 -0700 |
---|---|---|
committer | Duke Leto <jonathan@leto.net> | 2009-06-14 12:34:55 -0700 |
commit | 9c955c4d43e6b85fa829444681b37167f0dea301 (patch) | |
tree | 8ee31712f1cfce8c1b1f90e6935aa5284a2001bc /lib/perl5db.t | |
parent | f63574b540b77d4587478e51b1c4b2da2c769597 (diff) | |
download | perl-9c955c4d43e6b85fa829444681b37167f0dea301.tar.gz |
Add a test to the debugger about not having threads
Diffstat (limited to 'lib/perl5db.t')
-rwxr-xr-x | lib/perl5db.t | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/perl5db.t b/lib/perl5db.t index c52ae763aa..d5747cffc7 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'); |