5 if ( $ENV{PERL_CORE} ) {
11 package Term::ReadLine::Mock;
12 our @ISA = 'Term::ReadLine::Stub';
13 sub ReadLine {'Term::ReadLine::Mock'};
14 sub readline { "a line" }
19 use Test::More tests => 15;
22 $ENV{PERL_RL} = 'Mock'; # test against our instrumented class
23 use_ok('Term::ReadLine');
26 my $t = new Term::ReadLine 'test term::readline';
28 ok($t, "made something");
30 isa_ok($t, 'Term::ReadLine::Mock');
32 for my $method (qw( ReadLine readline addhistory IN OUT MinLine
33 findConsole Attribs Features new ) ) {
37 is($t->ReadLine, 'Term::ReadLine::Mock', "\$object->ReadLine");
38 is($t->readline, 'a line', "\$object->readline");