This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libtest-expect-perl.

commit ff6d0de20218a1ab63ef2adae2a80c4f4c711c01
Author: gregor herrmann <gre...@debian.org>
Date:   Sat Jun 6 18:15:31 2015 +0200

    Imported Upstream version 0.33
---
 Build.PL           |  4 +++-
 CHANGES            | 30 +++++++++++++++++++++---------
 MANIFEST           |  1 +
 META.json          | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 META.yml           | 39 ++++++++++++++++++++++-----------------
 Makefile.PL        | 25 +++++++++++--------------
 lib/Test/Expect.pm | 38 +++++++++++++++++++++++++++++++-------
 read               |  3 ++-
 readline           |  3 ++-
 t/simple.t         |  6 +++---
 10 files changed, 146 insertions(+), 53 deletions(-)

diff --git a/Build.PL b/Build.PL
index 55c2e7f..cf0508f 100644
--- a/Build.PL
+++ b/Build.PL
@@ -8,9 +8,11 @@ my $build = Module::Build->new(
   requires           => {
     'Class::Accessor::Chained::Fast'   => '0',
     'Expect::Simple' => '0',
-    'Term::ReadLine' => '0',
+  },
+  test_requires      => {
     'Test::Builder'  => '0',
     'Test::More'     => '0',
+    'Term::ReadLine' => '0',
   },
 );
 $build->create_build_script;
diff --git a/CHANGES b/CHANGES
index 3d01bed..88552e6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,12 +1,24 @@
-Revision history for Perl module Devel::ebug
+Revision history for Perl module Test::Expect
 
-0.31 Wed May  7 10:15:19 BST 2008
-     - add expect_quit method to close the Expect object
-       (patch by Alex Vandiver)
+0.33 2015-04-02
+ - Allow multi-argument forms of "command" to be passed
+ - Force Term::ReadLine in called programs to use the "Stub"
+   implementation, which has consistent output (vs Term::ReadLine::Perl)
 
-0.30 Tue Feb 28 21:54:16 GMT 2006
-     - added expect_handle to fetch the underlying Expect object
-       (patch by Kevin Riggle)
+0.32 2015-04-02
+ - Quote regex meta-characters before using them in a regex (fixes
+   #81987)
+ - Include leading space in PERL_RL variable (fixes #38914)
+ - New maintainer (BPS)
+
+0.31 2008-05-07
+ - add expect_quit method to close the Expect object (patch by Alex
+   Vandiver)
+
+0.30 2006-02-28
+ - added expect_handle to fetch the underlying Expect object (patch by
+   Kevin Riggle)
+
+0.29 2005-03-30
+ - initial release
 
-0.29 Wed Mar 30 23:18:02 CST 2005
-     - initial release
diff --git a/MANIFEST b/MANIFEST
index b35b194..2ce37ba 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -3,6 +3,7 @@ CHANGES
 lib/Test/Expect.pm
 Makefile.PL
 MANIFEST                       This list of files
+META.json
 META.yml
 read
 readline
diff --git a/META.json b/META.json
new file mode 100644
index 0000000..3112c1c
--- /dev/null
+++ b/META.json
@@ -0,0 +1,50 @@
+{
+   "abstract" : "Automated driving and testing of terminal-based programs",
+   "author" : [
+      "Best Practical Solutions, LLC E<lt>modu...@bestpractical.come<gt>",
+      "Original module by Leon Brocard, E<lt>a...@astray.come<gt>"
+   ],
+   "dynamic_config" : 1,
+   "generated_by" : "Module::Build version 0.4211",
+   "license" : [
+      "perl_5"
+   ],
+   "meta-spec" : {
+      "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec";,
+      "version" : "2"
+   },
+   "name" : "Test-Expect",
+   "prereqs" : {
+      "configure" : {
+         "requires" : {
+            "Module::Build" : "0.42"
+         }
+      },
+      "runtime" : {
+         "requires" : {
+            "Class::Accessor::Chained::Fast" : "0",
+            "Expect::Simple" : "0"
+         }
+      },
+      "test" : {
+         "requires" : {
+            "Term::ReadLine" : "0",
+            "Test::Builder" : "0",
+            "Test::More" : "0"
+         }
+      }
+   },
+   "provides" : {
+      "Test::Expect" : {
+         "file" : "lib/Test/Expect.pm",
+         "version" : "0.33"
+      }
+   },
+   "release_status" : "stable",
+   "resources" : {
+      "license" : [
+         "http://dev.perl.org/licenses/";
+      ]
+   },
+   "version" : "0.33"
+}
diff --git a/META.yml b/META.yml
index 4afe8c9..fc1526e 100644
--- a/META.yml
+++ b/META.yml
@@ -1,23 +1,28 @@
 ---
-name: Test-Expect
-version: 0.31
+abstract: 'Automated driving and testing of terminal-based programs'
 author:
-  - 'Leon Brocard, C<< <a...@astray.com> >>'
-abstract: Automated driving and testing of terminal-based programs
+  - 'Best Practical Solutions, LLC E<lt>modu...@bestpractical.come<gt>'
+  - 'Original module by Leon Brocard, E<lt>a...@astray.come<gt>'
+build_requires:
+  Term::ReadLine: '0'
+  Test::Builder: '0'
+  Test::More: '0'
+configure_requires:
+  Module::Build: '0.42'
+dynamic_config: 1
+generated_by: 'Module::Build version 0.4211, CPAN::Meta::Converter version 
2.150001'
 license: perl
-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
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.4.html
+  version: '1.4'
+name: Test-Expect
 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
+    version: '0.33'
+requires:
+  Class::Accessor::Chained::Fast: '0'
+  Expect::Simple: '0'
+resources:
+  license: http://dev.perl.org/licenses/
+version: '0.33'
diff --git a/Makefile.PL b/Makefile.PL
index d27dc7a..3b42019 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,18 +1,15 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.2808_01
+# Note: this file was auto-generated by Module::Build::Compat version 0.4211
 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',
-                           'Term::ReadLine' => '0',
-                           'Test::Builder' => '0',
-                           'Expect::Simple' => '0'
-                         }
-        )
+  'NAME' => 'Test::Expect',
+  'VERSION_FROM' => 'lib/Test/Expect.pm',
+  'PREREQ_PM' => {
+                   'Class::Accessor::Chained::Fast' => '0',
+                   'Expect::Simple' => '0'
+                 },
+  'INSTALLDIRS' => 'site',
+  'EXE_FILES' => [],
+  'PL_FILES' => {}
+)
 ;
diff --git a/lib/Test/Expect.pm b/lib/Test/Expect.pm
index 7405f83..db6b611 100644
--- a/lib/Test/Expect.pm
+++ b/lib/Test/Expect.pm
@@ -7,7 +7,7 @@ use Exporter;
 use Test::Builder;
 use base qw(Class::Accessor::Chained::Fast Exporter);
 __PACKAGE__->mk_accessors(qw(program));
-our $VERSION = "0.31";
+our $VERSION = "0.33";
 our @EXPORT  = qw(
     expect_run
     expect_handle
@@ -38,8 +38,9 @@ sub import {
 
 sub expect_run {
     my (%conf) = @_;
+    local $ENV{PERL_RL} = "Stub o=0";
     $expect = Expect::Simple->new(
-        {   Cmd           => "PERL_RL=\"o=0\" " . $conf{command},
+        {   Cmd           => $conf{command},
             Prompt        => $conf{prompt},
             DisconnectCmd => $conf{quit},
             Verbose       => 0,
@@ -56,7 +57,7 @@ sub expect_handle { return $expect->expect_handle(); }
 sub before {
     my $before = $expect->before;
     $before =~ s/\r//g;
-    $before =~ s/^$sent// if $sent;
+    $before =~ s/^\Q$sent\E// if $sent;
     $before =~ s/^\n+//;
     $before =~ s/\n+$//;
     return $before;
@@ -107,7 +108,7 @@ Test::Expect - Automated driving and testing of 
terminal-based programs
   use Test::Expect;
   use Test::More tests => 13;
   expect_run(
-    command => "perl testme.pl",
+    command => ["perl", "testme.pl"],
     prompt  => 'testme: ',
     quit    => 'quit',
   );
@@ -135,11 +136,14 @@ the interactive program to run, what the prompt of the 
program is, and
 which command quits the program:
 
   expect_run(
-    command => "perl testme.pl",
+    command => ["perl", "testme.pl"],
     prompt  => 'testme: ',
     quit    => 'quit',
   );
 
+The C<command> may either be a string, or an arrayref of program and
+arguments; the latter for bypasses the shell.
+
 =head2 expect
 
 The expect subroutine is the catch all subroutine. You pass in the
@@ -173,7 +177,7 @@ Test::More's like. It has an optional comment:
 
 This returns the L<Expect> object.
 
-=head1 expect_quit
+=head2 expect_quit
 
 Closes the L<Expect> handle.
 
@@ -183,11 +187,31 @@ L<Expect>, L<Expect::Simple>.
 
 =head1 AUTHOR
 
-Leon Brocard, C<< <a...@astray.com> >>
+Best Practical Solutions, LLC E<lt>modu...@bestpractical.come<gt>
+
+Original module by Leon Brocard, E<lt>a...@astray.come<gt>
+
+=head1 BUGS
+
+=for html <p>All bugs should be reported via email to <a
+href="mailto:bug-rt-extension-...@rt.cpan.org";>bug-rt-extension-...@rt.cpan.org</a>
+or via the web at <a
+href="http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-SLA";>rt.cpan.org</a>.</p>
+
+=for text
+    All bugs should be reported via email to
+        bug-rt-extension-...@rt.cpan.org
+    or via the web at
+        http://rt.cpan.org/Public/Dist/Display.html?Name=RT-Extension-SLA
+
 
 =head1 COPYRIGHT
 
+This extension is Copyright (C) 2015 Best Practical Solutions, LLC.
+
 Copyright (C) 2005, Leon Brocard
 
 This module is free software; you can redistribute it or modify it
 under the same terms as Perl itself.
+
+=cut
diff --git a/read b/read
index 6855fb2..56252cc 100644
--- a/read
+++ b/read
@@ -3,7 +3,8 @@ use strict;
 use warnings;
 $| = 1;
 
-print "* Hi there, to read\n";
+my $what = $ARGV[0] || "there";
+print "* Hi $what, to read\n";
 
 while (1) {
   print "read: ";
diff --git a/readline b/readline
index 68e33e5..df5665c 100644
--- a/readline
+++ b/readline
@@ -3,7 +3,8 @@ use strict;
 use warnings;
 use Term::ReadLine;
 
-print "* Hi there, to readline\n";
+my $what = $ARGV[0] || "there";
+print "* Hi $what, to readline\n";
 
 my $term = Term::ReadLine->new('readline');
 
diff --git a/t/simple.t b/t/simple.t
index f5e8b5a..841dda4 100644
--- a/t/simple.t
+++ b/t/simple.t
@@ -12,13 +12,13 @@ ok(1, "True");
 foreach my $filename ('read', 'readline') {
   ok($filename, "Testing $filename");
   expect_run(
-    command => "$^X $filename",
+    command => [$^X, $filename, "world"],
     prompt  => $filename . ': ',
     quit    => 'quit',
   );
   isa_ok(expect_handle(), 'Expect');
-  expect_like(qr/Hi there, to $filename/, "expect_like");
-  expect_is("* Hi there, to $filename", "expect_is");
+  expect_like(qr/Hi world, to $filename/, "expect_like");
+  expect_is("* Hi world, to $filename", "expect_is");
   expect_send("ping", "expect_send");
   expect("ping", "pong", "expect");
 };

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libtest-expect-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to