r19747 - in /trunk/libtest-expect-perl: CHANGES META.yml Makefile.PL debian/changelog lib/Test/Expect.pm
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri May 9 12:26:52 UTC 2008
Author: gregoa
Date: Fri May 9 12:26:52 2008
New Revision: 19747
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=19747
Log:
New upstream release.
Modified:
trunk/libtest-expect-perl/CHANGES
trunk/libtest-expect-perl/META.yml
trunk/libtest-expect-perl/Makefile.PL
trunk/libtest-expect-perl/debian/changelog
trunk/libtest-expect-perl/lib/Test/Expect.pm
Modified: trunk/libtest-expect-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-expect-perl/CHANGES?rev=19747&op=diff
==============================================================================
--- trunk/libtest-expect-perl/CHANGES (original)
+++ trunk/libtest-expect-perl/CHANGES Fri May 9 12:26:52 2008
@@ -1,4 +1,8 @@
Revision history for Perl module Devel::ebug
+
+0.31 Wed May 7 10:15:19 BST 2008
+ - add expect_quit method to close the Expect object
+ (patch by Alex Vandiver)
0.30 Tue Feb 28 21:54:16 GMT 2006
- added expect_handle to fetch the underlying Expect object
Modified: trunk/libtest-expect-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-expect-perl/META.yml?rev=19747&op=diff
==============================================================================
--- trunk/libtest-expect-perl/META.yml (original)
+++ trunk/libtest-expect-perl/META.yml Fri May 9 12:26:52 2008
@@ -1,8 +1,23 @@
---- #YAML:1.0
+---
name: Test-Expect
-version: 0.30
+version: 0.31
author:
- - Leon Brocard, C<< <acme at astray.com> >>
+ - 'Leon Brocard, C<< <acme at astray.com> >>'
abstract: Automated driving and testing of terminal-based programs
license: perl
-generated_by: Module::Build version 0.2611, without YAML.pm
+resources:
+ license: http://dev.perl.org/licenses/
+requires:
+ Class::Accessor::Chained::Fast: 0
+ Expect::Simple: 0
+ Term::ReadLine: 0
+ Test::Builder: 0
+ Test::More: 0
+provides:
+ Test::Expect:
+ file: lib/Test/Expect.pm
+ version: 0.31
+generated_by: Module::Build version 0.280801
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
Modified: trunk/libtest-expect-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-expect-perl/Makefile.PL?rev=19747&op=diff
==============================================================================
--- trunk/libtest-expect-perl/Makefile.PL (original)
+++ trunk/libtest-expect-perl/Makefile.PL Fri May 9 12:26:52 2008
@@ -1,17 +1,18 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.03
+# Note: this file was auto-generated by Module::Build::Compat version 0.2808_01
use ExtUtils::MakeMaker;
WriteMakefile
(
+ 'PL_FILES' => {},
+ 'INSTALLDIRS' => 'site',
'NAME' => 'Test::Expect',
+ 'EXE_FILES' => [],
'VERSION_FROM' => 'lib/Test/Expect.pm',
'PREREQ_PM' => {
+ 'Test::More' => '0',
'Class::Accessor::Chained::Fast' => '0',
- 'Expect::Simple' => '0',
'Term::ReadLine' => '0',
'Test::Builder' => '0',
- 'Test::More' => '0'
- },
- 'INSTALLDIRS' => 'site',
- 'PL_FILES' => {}
+ 'Expect::Simple' => '0'
+ }
)
;
Modified: trunk/libtest-expect-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-expect-perl/debian/changelog?rev=19747&op=diff
==============================================================================
--- trunk/libtest-expect-perl/debian/changelog (original)
+++ trunk/libtest-expect-perl/debian/changelog Fri May 9 12:26:52 2008
@@ -1,9 +1,11 @@
-libtest-expect-perl (0.30-3) UNRELEASED; urgency=low
+libtest-expect-perl (0.31-1) UNRELEASED; urgency=low
* debian/rules: don't install empty /usr/lib/perl5 directory.
* debian/rules: delete /usr/lib/perl5 only if it exists.
+
+ * New upstream release.
- -- gregor herrmann <gregor+debian at comodo.priv.at> Sun, 02 Dec 2007 16:31:38 +0100
+ -- gregor herrmann <gregoa at debian.org> Fri, 09 May 2008 14:24:58 +0200
libtest-expect-perl (0.30-2) unstable; urgency=high
Modified: trunk/libtest-expect-perl/lib/Test/Expect.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-expect-perl/lib/Test/Expect.pm?rev=19747&op=diff
==============================================================================
--- trunk/libtest-expect-perl/lib/Test/Expect.pm (original)
+++ trunk/libtest-expect-perl/lib/Test/Expect.pm Fri May 9 12:26:52 2008
@@ -7,15 +7,16 @@
use Test::Builder;
use base qw(Class::Accessor::Chained::Fast Exporter);
__PACKAGE__->mk_accessors(qw(program));
-our $VERSION = "0.30";
-our @EXPORT = qw(
-expect_run
-expect_handle
-expect_is
-expect_like
-expect_send
-expect
-END
+our $VERSION = "0.31";
+our @EXPORT = qw(
+ expect_run
+ expect_handle
+ expect_is
+ expect_like
+ expect_send
+ expect_quit
+ expect
+ END
);
my $Test = Test::Builder->new;
@@ -24,67 +25,72 @@
my $sent;
sub import {
- my $self = shift;
- if (@_) {
- die @_;
- my $package = caller;
- $Test->exported_to($package);
- $Test->plan(@_);
- };
- $Test->no_ending(0);
- $self->export_to_level(1, $self, $_) foreach @EXPORT;
+ my $self = shift;
+ if (@_) {
+ die @_;
+ my $package = caller;
+ $Test->exported_to($package);
+ $Test->plan(@_);
+ }
+ $Test->no_ending(0);
+ $self->export_to_level( 1, $self, $_ ) foreach @EXPORT;
}
sub expect_run {
- my(%conf) = @_;
- $expect = Expect::Simple->new({
- Cmd => "PERL_RL=\"o=0\" " . $conf{command},
- Prompt => $conf{prompt},
- DisconnectCmd => $conf{quit},
- Verbose => 0,
- Debug => 0,
- Timeout => 100
-});
- die $expect->error if $expect->error;
- $Test->ok(1, "expect_run");
+ my (%conf) = @_;
+ $expect = Expect::Simple->new(
+ { Cmd => "PERL_RL=\"o=0\" " . $conf{command},
+ Prompt => $conf{prompt},
+ DisconnectCmd => $conf{quit},
+ Verbose => 0,
+ Debug => 0,
+ Timeout => 100
+ }
+ );
+ die $expect->error if $expect->error;
+ $Test->ok( 1, "expect_run" );
}
sub expect_handle { return $expect->expect_handle(); }
sub before {
- my $before = $expect->before;
- $before =~ s/\r//g;
- $before =~ s/^$sent// if $sent;
- $before =~ s/^\n+//;
- $before =~ s/\n+$//;
- return $before;
+ my $before = $expect->before;
+ $before =~ s/\r//g;
+ $before =~ s/^$sent// if $sent;
+ $before =~ s/^\n+//;
+ $before =~ s/\n+$//;
+ return $before;
}
sub expect_like {
- my($like, $comment) = @_;
- $Test->like(before(), $like, $comment);
+ my ( $like, $comment ) = @_;
+ $Test->like( before(), $like, $comment );
}
sub expect_is {
- my($is, $comment) = @_;
- $Test->is_eq(before(), $is, $comment);
+ my ( $is, $comment ) = @_;
+ $Test->is_eq( before(), $is, $comment );
}
sub expect_send {
- my($send, $comment) = @_;
- $expect->send($send);
- $sent = $send;
- $Test->ok(1, $comment);
+ my ( $send, $comment ) = @_;
+ $expect->send($send);
+ $sent = $send;
+ $Test->ok( 1, $comment );
}
sub expect {
- my($send, $is, $label) = @_;
- expect_send($send, $label);
- expect_is($is, $label);
+ my ( $send, $is, $label ) = @_;
+ expect_send( $send, $label );
+ expect_is( $is, $label );
+}
+
+sub expect_quit {
+ undef $expect;
}
sub END {
- undef $expect;
+ expect_quit;
}
1;
@@ -167,6 +173,10 @@
This returns the L<Expect> object.
+=head1 expect_quit
+
+Closes the L<Expect> handle.
+
=head1 SEE ALSO
L<Expect>, L<Expect::Simple>.
More information about the Pkg-perl-cvs-commits
mailing list