[libterm-readkey-perl] 03/13: Imported Upstream version 2.33

gregor herrmann gregoa at debian.org
Sun Jul 12 16:53:45 UTC 2015


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

gregoa pushed a commit to branch master
in repository libterm-readkey-perl.

commit 6217e6f93cb46c250419c41d0aad0fb93d7815d6
Author: gregor herrmann <gregoa at debian.org>
Date:   Sun Jul 12 18:26:26 2015 +0200

    Imported Upstream version 2.33
---
 Changes                    | 104 +++++++++++++++++++++++++++++++++++++++++----
 MANIFEST                   |   5 ++-
 MANIFEST.SKIP              |   3 ++
 META.json                  |  16 ++++++-
 META.yml                   |  11 +++--
 Makefile.PL                |  13 +++---
 README                     |  29 ++++++-------
 ReadKey.pm                 |   6 +--
 test.pl => example/test.pl |   0
 genchars.pl                |   4 +-
 t/01_basic.t               |   7 +++
 t/02_terminal_functions.t  |  86 +++++++++++++++++++++++++++++++++++++
 12 files changed, 244 insertions(+), 40 deletions(-)

diff --git a/Changes b/Changes
index 32555e9..6372ca3 100644
--- a/Changes
+++ b/Changes
@@ -1,3 +1,91 @@
+2015-06-04  Jonathan Stowe <jns+git at gellyfish.co.uk>
+
+	* .gitignore, Changes, META.yml, README, ReadKey.pm: Up version
+
+2015-06-04  Jonathan Stowe <jns+git at gellyfish.co.uk>
+
+	* .gitignore: Add .bs file to .gitignore
+
+2015-06-04  Jonathan Stowe <jns at gellyfish.co.uk>
+
+	* : Merge pull request #6 from ntyni/master Make genchars.pl output reproducible by sorting hash keys
+
+2015-04-30  Jonathan Stowe <jns+git at gellyfish.co.uk>
+
+	* Makefile.PL: Fix for "[rt.cpan.org #100932] Parallel build fails"
+	from Petr Pisar
+
+2015-04-30  Jonathan Stowe <jns+git at gellyfish.co.uk>
+
+	* MANIFEST.SKIP: Add .git directory to the MANIFEST.SKIP
+
+2015-04-13  Jonathan Stowe <jns+git at gellyfish.co.uk>
+
+	* MANIFEST, MANIFEST.SKIP: Add new artefacts
+
+2015-04-13  Jonathan Stowe <jns+git at gellyfish.co.uk>
+
+	* .travis.yml: Add travis-ci testing
+
+2015-04-13  Jonathan Stowe <jns+git at gellyfish.co.uk>
+
+	* .gitignore: Add .gitignore
+
+2015-04-13  Jonathan Stowe <jns at gellyfish.co.uk>
+
+	* : Merge pull request #5 from
+	sdeseille/Create_T_directory_and_split_test.pl Create t directory and split test.pl
+
+2015-04-11  Sébastien Deseille <sebastien.deseille at gmail.com>
+
+	* README: Update README to reflect the move of test.pl in example
+	subdirectory
+
+2015-04-11  Sébastien Deseille <sebastien.deseille at gmail.com>
+
+	* README: Revert "Update README to reflect the move of test.pl in
+	example subdirectory" This reverts commit 09402dcd68d8d0417e0eb2f9ea0aeaf4b4c72e9a.
+
+2015-04-11  Sébastien Deseille <sebastien.deseille at gmail.com>
+
+	* README: Update README to reflect the move of test.pl in example
+	subdirectory
+
+2015-04-11  Sébastien Deseille <sebastien.deseille at gmail.com>
+
+	* example/test.pl, test.pl: Move test.pl in example's subdirectory
+	in order to keep the possibility to use its interactive mode
+
+2015-04-11  Sébastien Deseille <sebastien.deseille at gmail.com>
+
+	* t/02_terminal_functions.t: Finished to implement all tests from
+	test.pl
+
+2015-04-11  Sébastien Deseille <sebastien.deseille at gmail.com>
+
+	* t/02_terminal_functions.t: Add test to Check TerminalSize OUT
+
+2015-04-11  Sébastien Deseille <sebastien.deseille at gmail.com>
+
+	* t/02_terminal_functions.t: Add test to Check non-blocking read
+
+2015-04-10  Sébastien Deseille <sebastien.deseille at gmail.com>
+
+	* t/02_terminal_functions.t: Add second test about Comparing
+	TerminalSize
+
+2015-04-10  Sébastien Deseille <sebastien.deseille at gmail.com>
+
+	* t/01_basic.t: Add first test to validate module loading
+
+2015-04-03  Jonathan Stowe <jns at gellyfish.co.uk>
+
+	* : Merge pull request #3 from kmx/master no resize, no stty on MS Windows
+
+2014-05-10  Jonathan Stowe <jns+git at gellyfish.co.uk>
+
+	* Changes: Update changes with git2cl (some manual reordering)
+
 2014-05-10  Jonathan Stowe <jns+git at gellyfish.co.uk>
 
 	* Makefile.PL: Makefile.PL more specific
@@ -73,14 +161,6 @@
 	* MANIFEST, Makefile.PL: Added Changes git-svn-id: http://jstowe.googlecode.com/svn/trunk/TermReadKey@74
 	d4a3e428-c23c-0410-a93a-b1ce904c0fb3
 
-2005-01-12  Jonathan Stowe <jns at gellyfish.co.uk>
-
-	* Configure.pm, MANIFEST, META.yml, Makefile.PL, README,
-	ReadKey.pm, ReadKey.xs, genchars.pl, ppport.h, test.pl: import
-	TermReadKey 2.30 from CPAN git-cpan-module:   TermReadKey git-cpan-version:  2.30
-	git-cpan-authorid: JSTOWE git-cpan-file:
-	authors/id/J/JS/JSTOWE/TermReadKey-2.30.tar.gz
-
 2005-01-11  jonathan <jonathan at d4a3e428-c23c-0410-a93a-b1ce904c0fb3>
 
 	* test.pl: Skip tests if /dev/tty for automated testing git-svn-id: http://jstowe.googlecode.com/svn/trunk/TermReadKey@53
@@ -101,6 +181,14 @@
 	* Put back in CVS git-svn-id: http://jstowe.googlecode.com/svn/trunk/TermReadKey@19
 	d4a3e428-c23c-0410-a93a-b1ce904c0fb3
 
+2005-01-12  Jonathan Stowe <jns at gellyfish.co.uk>
+
+	* Configure.pm, MANIFEST, META.yml, Makefile.PL, README,
+	ReadKey.pm, ReadKey.xs, genchars.pl, ppport.h, test.pl: import
+	TermReadKey 2.30 from CPAN git-cpan-module:   TermReadKey git-cpan-version:  2.30
+	git-cpan-authorid: JSTOWE git-cpan-file:
+	authors/id/J/JS/JSTOWE/TermReadKey-2.30.tar.gz
+
 2002-07-28  Jonathan Stowe <jns at gellyfish.co.uk>
 
 	* README, ReadKey.pm, ReadKey.xs, ppport.h, test.pl: import
diff --git a/MANIFEST b/MANIFEST
index e594253..b4c4077 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1,12 +1,15 @@
 Configure.pm
 MANIFEST
+MANIFEST.SKIP
 Makefile.PL
 README
 ReadKey.pm
 ReadKey.xs
 genchars.pl
 ppport.h
-test.pl
+example/test.pl
+t/01_basic.t
+t/02_terminal_functions.t
 Changes
 META.yml                                Module meta-data (added by MakeMaker)
 META.json                                Module JSON meta-data (added by MakeMaker)
diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP
new file mode 100644
index 0000000..422a152
--- /dev/null
+++ b/MANIFEST.SKIP
@@ -0,0 +1,3 @@
+.gitignore
+.travis.yml
+.git
diff --git a/META.json b/META.json
index c59f38c..bcc2fda 100644
--- a/META.json
+++ b/META.json
@@ -4,7 +4,7 @@
       "unknown"
    ],
    "dynamic_config" : 1,
-   "generated_by" : "ExtUtils::MakeMaker version 6.64, CPAN::Meta::Converter version 2.120921",
+   "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.142060",
    "license" : [
       "perl_5"
    ],
@@ -25,6 +25,18 @@
          "Configure"
       ]
    },
+   "prereqs" : {
+      "build" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "0"
+         }
+      },
+      "configure" : {
+         "requires" : {
+            "ExtUtils::MakeMaker" : "0"
+         }
+      }
+   },
    "release_status" : "stable",
    "resources" : {
       "repository" : {
@@ -33,5 +45,5 @@
          "web" : "https://github.com/jonathanstowe/TermReadKey"
       }
    },
-   "version" : "2.32"
+   "version" : "2.33"
 }
diff --git a/META.yml b/META.yml
index f46f2a6..89dde46 100644
--- a/META.yml
+++ b/META.yml
@@ -2,13 +2,16 @@
 abstract: unknown
 author:
   - unknown
-build_requires: {}
+build_requires:
+  ExtUtils::MakeMaker: '0'
+configure_requires:
+  ExtUtils::MakeMaker: '0'
 dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.64, CPAN::Meta::Converter version 2.120921'
+generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.142060'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
-  version: 1.4
+  version: '1.4'
 name: TermReadKey
 no_index:
   directory:
@@ -20,4 +23,4 @@ no_index:
     - Configure
 resources:
   repository: https://github.com/jonathanstowe/TermReadKey.git
-version: 2.32
+version: '2.33'
diff --git a/Makefile.PL b/Makefile.PL
index 96a1f35..4c97e22 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -30,7 +30,10 @@ if( $mm_version < 3.5 ) {
 	PM => { "ReadKey.pm" => '$(INST_LIBDIR)/ReadKey.pm'},
 
 	'dist' => { COMPRESS=>"gzip", SUFFIX=>"gz" },
-        
+  "test" => {
+    "TESTS" => "t/*.t"
+  }
+
 # Uncomment these to allow testing of sgtty under Linux. Not needed normally.
 #	INC => "-I/usr/include/bsd",
 #	LIBS => "-lbsd"
@@ -49,10 +52,10 @@ sub MY::top_targets {
 	$_ .= "
 
 sgtty cchars.h: genchars.pl
-	\$(PERL) -Mblib -I\$(PERL_LIB) genchars.pl
+	\$(PERL) -I. -I\$(PERL_LIB) genchars.pl
 
 distcc: genchars.pl
-	\$(PERL) -Mblib -I\$(PERL_LIB) genchars.pl dist
+	\$(PERL) -I. -I\$(PERL_LIB) genchars.pl dist
 
 ReadKey.c: cchars.h
 
@@ -64,7 +67,7 @@ ReadKey.c: cchars.h
 sub MY::test {
 	my $self = shift;
 	$_ = $self->MM::test();
-	s/test.pl/-w test.pl/;
+	s#example/test.pl#-w example/test.pl#;
 	$_;
 }
 
@@ -77,7 +80,7 @@ sub MY::pure_site_install
 {
     my $self = shift;
     my $new = $self->MM::test();
-       
+
     $new .= "\n\t./register_module Your::Module";
     return $new;
 }
diff --git a/README b/README
index 6bf9d67..8769c8d 100644
--- a/README
+++ b/README
@@ -1,12 +1,12 @@
- Term::ReadKey 2.32 - Change terminal modes, and perform non-blocking reads.
+ Term::ReadKey 2.33 - Change terminal modes, and perform non-blocking reads.
 
- Copyright (C) 1994-1999 Kenneth Albanowski. 
-               2001-2014 Jonathan Stowe and others
+ Copyright (C) 1994-1999 Kenneth Albanowski.
+               2001-2015 Jonathan Stowe and others
 
 This package is dual licensed.  You can either choose to license it under
 the original terms which were:
 
- Unlimited distribution and/or modification is allowed as long as this 
+ Unlimited distribution and/or modification is allowed as long as this
  copyright notice remains intact.
 
 Or the standard Perl terms:
@@ -40,7 +40,7 @@ interactive tests whilst confirming that the module has built correctly
 and has a good chance of working correctly cannot determine whether the
 effect as observed on the screen is correct so you might want to run:
 
-   perl -Mblib test.pl interactive
+   perl -Mblib example/test.pl interactive
 
 before you run 'make install'.
 
@@ -67,7 +67,7 @@ character is waiting, please call it with -1, instead of 1. Positive
 arguments now indicate a timeout, so 1 would wait a second before timing
 out.
 
-As older versions will accept -1, it is reccomended to change all code 
+As older versions will accept -1, it is reccomended to change all code
 that uses ReadMode.
 
 
@@ -78,21 +78,21 @@ should be one of the following:
 	0: (Reset) Restore original settings.
 
 	1: (Cooked) Change to what is commonly the default mode, echo on,
-           buffered, signals enabled, Xon/Xoff possibly enabled, and 8-bit mode 
+           buffered, signals enabled, Xon/Xoff possibly enabled, and 8-bit mode
 	   possibly disabled.
 
-	2: (Cooked-Invisible) Same as 1, just with echo off. Nice for reading 
+	2: (Cooked-Invisible) Same as 1, just with echo off. Nice for reading
            passwords.
 
-	3: (CBreak) Echo off, unbuffered, signals enabled, Xon/Xoff possibly 
+	3: (CBreak) Echo off, unbuffered, signals enabled, Xon/Xoff possibly
            enabled, and 8-bit mode possibly enabled.
 
-	4: (Raw) Echo off, unbuffered, signals disabled, Xon/Xoff disabled, 
+	4: (Raw) Echo off, unbuffered, signals disabled, Xon/Xoff disabled,
            and 8-bit mode possibly disabled.
 
-	5: (Really-Raw) Echo off, unbuffered, signals disabled, Xon/Xoff 
-           disabled, 8-bit mode enabled if parity permits, and CR to CR/LF 
-           translation turned off. 
+	5: (Really-Raw) Echo off, unbuffered, signals disabled, Xon/Xoff
+           disabled, 8-bit mode enabled if parity permits, and CR to CR/LF
+           translation turned off.
 
 If you just need to read a key at a time, then modes 3 or 4 are probably
 sufficient. Mode 4 is a tad more flexible, but needs a bit more work to
@@ -135,7 +135,7 @@ will get fixed if at all possible, but that's not going to happen if I don't
 know about them.
 
 The code is available at https://github.com/jonathanstowe/TermReadKey so
-as ever patches are kindly welcomed, especially for platforms such as 
+as ever patches are kindly welcomed, especially for platforms such as
 Windows that I am unable to test on.
 
 Oh, you may also be interested in the Configure.pm module. It provides tools
@@ -143,4 +143,3 @@ to make porting stuff easier -- calling the compiler, finding headers, etc.
 It contains documentation inside it, and you are welcome to use it in your
 own modules. If you make use of it, I'd be grateful for a message sent to
 the above address.
-
diff --git a/ReadKey.pm b/ReadKey.pm
index 91e4b95..a2642e1 100644
--- a/ReadKey.pm
+++ b/ReadKey.pm
@@ -275,7 +275,7 @@ choose to license this under the standard Perl license:
 
 use vars qw($VERSION);
 
-$VERSION = '2.32';
+$VERSION = '2.33';
 
 require Exporter;
 require AutoLoader;
@@ -390,7 +390,7 @@ sub GetTerminalSize
         push( @fail, "COLUMNS and LINES environment variables" );
     }
 
-    if ( @results < 4 )
+    if ( @results < 4 && $^O ne 'MSWin32')
     {
         my ($prog) = "resize";
 
@@ -425,7 +425,7 @@ sub GetTerminalSize
         push( @fail, "resize program" );
     }
 
-    if ( @results < 4 )
+    if ( @results < 4 && $^O ne 'MSWin32' )
     {
         my ($prog) = "stty size";
 
diff --git a/test.pl b/example/test.pl
similarity index 100%
rename from test.pl
rename to example/test.pl
diff --git a/genchars.pl b/genchars.pl
index fe62ea7..b5550d2 100644
--- a/genchars.pl
+++ b/genchars.pl
@@ -98,7 +98,7 @@ print CCHARS "#define HAVE_SYS_POLL_H\n" if CheckHeader("sys/poll.h");
 
 print "\n";
 if(1) {
-	@values = sort { $possible{$a} cmp $possible{$b} } keys %possible;
+	@values = sort { $possible{$a} cmp $possible{$b} or $a cmp $b } keys %possible;
 
 	print "Writing termio/termios section of cchars.h... ";
 	print CCHARS "
@@ -303,7 +303,7 @@ if($SGTTY) {
 	print "Checking symbols\n";
 
 
-	for $c (keys %possible2) {
+	for $c (sort keys %possible2) {
 
 #		if($tchars and !report("
 ##include <sgtty.h>
diff --git a/t/01_basic.t b/t/01_basic.t
new file mode 100644
index 0000000..292f96b
--- /dev/null
+++ b/t/01_basic.t
@@ -0,0 +1,7 @@
+use strict;
+use warnings;
+
+
+use Test::More tests => 1;
+
+use_ok 'Term::ReadKey';
diff --git a/t/02_terminal_functions.t b/t/02_terminal_functions.t
new file mode 100644
index 0000000..09fe2e4
--- /dev/null
+++ b/t/02_terminal_functions.t
@@ -0,0 +1,86 @@
+use strict;
+use warnings;
+
+
+use Test::More tests => 7;
+
+use Term::ReadKey;
+use Fcntl;
+
+if ( not exists $ENV{COLUMNS} ){
+    $ENV{COLUMNS} = 80;
+    $ENV{LINES}   = 24;
+}
+
+SKIP:
+{
+    eval {
+        if ( $^O =~ /Win32/i ){
+            sysopen( IN,  'CONIN$',  O_RDWR ) or die "Unable to open console input:$!";
+            sysopen( OUT, 'CONOUT$', O_RDWR ) or die "Unable to open console output:$!";
+        }
+        else{
+            if ( open( IN, "</dev/tty" ) ){
+                *OUT = *IN;
+                die "Foo" unless -t OUT;
+            }
+            else{
+                die "/dev/tty is absent\n";
+            }
+        }
+    };
+    skip( 'Because Term::ReadKey need at least a tty to be useful', 1 ) if $@;
+    *IN = *IN;    # Make single-use warning go away
+    $|  = 1;
+    no strict "subs";
+    my $size1 = join( ",", GetTerminalSize( \IN ) );
+    my $size2 = join( ",", GetTerminalSize("IN") );
+    my $size3 = join( ",", GetTerminalSize(*IN) );
+    my $size4 = join( ",", GetTerminalSize( \*IN ) );
+
+    my $size_result=0;
+    if ( ( $size1 eq $size2 ) && ( $size2 eq $size3 ) && ( $size3 eq $size4 ) ){
+        $size_result = 1;
+    }
+    is($size_result, 1, "Comparing TerminalSize IN");
+
+    my $usable_terminal=0;
+    for (my $i = 1; $i < 6; $i++){
+        if ( &Term::ReadKey::termoptions() == $i ){
+            $usable_terminal = 1;
+            last;
+        }
+    }
+    is($usable_terminal, 1, "Manipulating the terminal.");
+
+    my @modes;
+    eval {
+        push( @modes, "O_NODELAY" ) if &Term::ReadKey::blockoptions() & 1;
+        push( @modes, "poll()" )    if &Term::ReadKey::blockoptions() & 2;
+        push( @modes, "select()" )  if &Term::ReadKey::blockoptions() & 4;
+        push( @modes, "Win32" )     if &Term::ReadKey::blockoptions() & 8;
+    };
+    is($@, '', "Check non-blocking read");
+
+    eval {
+        my @size = GetTerminalSize(OUT);
+    };
+    is($@, '', "Check TerminalSize OUT");
+
+    eval {
+        my @speeds = GetSpeed();
+    };
+    is($@, '', "Check Terminal communication speed");
+
+    my %chars;
+    eval {
+        %chars = GetControlChars(IN);
+    };
+    is($@, '', "Validate GetControlChars function");
+
+    my %origchars = %chars;
+    eval {
+        SetControlChars( %origchars, IN );
+    };
+    is($@, '', "Validate SetControlChars function");
+}

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



More information about the Pkg-perl-cvs-commits mailing list