Skip to content

Commit

Permalink
Merge pull request #1 from SysPete/fix/rt-99871
Browse files Browse the repository at this point in the history
remove build dependency on Test::Exception - rt#99871
  • Loading branch information
jacoby committed Jun 8, 2016
2 parents ae6aa8a + a275fd5 commit bde2d42
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
1 change: 0 additions & 1 deletion Makefile.PL
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ my %configure_requires = (
my %build_requires = ();
my %test_requires = (
'Test::More' => '1.00',
'Test::Exception' => '0.32',

# standard modules:
'File::Temp' => 0,
Expand Down
4 changes: 2 additions & 2 deletions t/01-test.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ use strict;
use warnings;

use Test::More tests => 14;
use Test::Exception;
use File::Temp qw(tempdir);
use Expect;
use Config;
Expand Down Expand Up @@ -441,7 +440,8 @@ subtest respawn => sub {

my $exp = Expect->new;
$exp->spawn( $Perl . q{ -e 'print "42\n"'} );
throws_ok { $exp->spawn( $Perl . q{ -e 'print "23\n"'} ) } qr/^Cannot reuse an object with an already spawned command/;
eval { $exp->spawn( $Perl . q{ -e 'print "23\n"'} ) };
like $@, qr/^Cannot reuse an object with an already spawned command/;
};


Expand Down
7 changes: 4 additions & 3 deletions t/10-internal.t
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ use strict;
use warnings;

use Test::More tests => 17;
use Test::Exception;

use Expect;

my $e = Expect->new;
throws_ok { $e->_trim_length } qr/^No string passed/;
eval { $e->_trim_length };
like $@, qr/^No string passed/;
is $e->_trim_length('a' x 999), 'a' x 999;
is $e->_trim_length('a' x 1021), 'a' x 1021;
is $e->_trim_length('a' x 1023), '...' . 'a' x 1021;
Expand All @@ -16,7 +16,8 @@ is $e->_trim_length('a' x 1025), '...' . 'a' x 1021;
is $e->_trim_length('a' x 1025, 2000), 'a' x 1025;
is $e->_trim_length('a' x 2001, 2000), 'a' x 2000;

throws_ok { Expect::_trim_length() } qr/^No string passed/;
eval { Expect::_trim_length() };
like $@, qr/^No string passed/;
is Expect::_trim_length(undef, "z" x 1020), 'z' x 1020;
is Expect::_trim_length(undef, "z" x 1021), 'z' x 1021;
is Expect::_trim_length(undef, "z" x 1022), '...' . 'z' x 1021;
Expand Down

0 comments on commit bde2d42

Please sign in to comment.