From 7f4d7a860e99508a6d987ad8b17c5f085376cf40 Mon Sep 17 00:00:00 2001 From: Florian Ragwitz Date: Wed, 13 Jul 2011 17:26:42 +0200 Subject: [PATCH] Dual-life Term::Complete --- MANIFEST | 4 ++-- META.yml | 1 + Porting/Maintainers.pl | 9 ++++++++- {lib => dist/Term-Complete/lib}/Term/Complete.pm | 0 {lib/Term => dist/Term-Complete/t}/Complete.t | 11 +++-------- lib/.gitignore | 6 +----- 6 files changed, 15 insertions(+), 16 deletions(-) rename {lib => dist/Term-Complete/lib}/Term/Complete.pm (100%) rename {lib/Term => dist/Term-Complete/t}/Complete.t (97%) diff --git a/MANIFEST b/MANIFEST index 7f91488..ac1fbc6 100644 --- a/MANIFEST +++ b/MANIFEST @@ -3319,6 +3319,8 @@ dist/Storable/t/tied.t See if Storable works dist/Storable/t/utf8hash.t See if Storable works dist/Storable/t/utf8.t See if Storable works dist/Storable/t/weak.t Can Storable store weakrefs +dist/Term-Complete/lib/Term/Complete.pm A command completion subroutine +dist/Term-Complete/t/Complete.t See if Term::Complete works dist/Term-ReadLine/lib/Term/ReadLine.pm Stub readline library dist/Term-ReadLine/t/ReadLine.t See if Term::ReadLine works dist/Text-Abbrev/lib/Text/Abbrev.pm An abbreviation table builder @@ -4052,8 +4054,6 @@ lib/subs.pm Declare overriding subs lib/subs.t See if subroutine pseudo-importation works lib/Symbol.pm Symbol table manipulation routines lib/Symbol.t See if Symbol works -lib/Term/Complete.pm A command completion subroutine -lib/Term/Complete.t See if Term::Complete works lib/Thread.pm Thread extensions frontend lib/Thread.t Thread extensions frontend tests lib/Tie/Array.pm Base class for tied arrays diff --git a/META.yml b/META.yml index 13a27e4..b3be6d4 100644 --- a/META.yml +++ b/META.yml @@ -47,6 +47,7 @@ no_index: - dist/Safe - dist/SelfLoader - dist/Storable + - dist/Term-Complete - dist/Term-ReadLine - dist/Text-Abbrev - dist/Thread-Queue diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index dd80e3a..8ed4b0b 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1714,6 +1714,14 @@ use File::Glob qw(:case); 'UPSTREAM' => undef, }, + 'Term::Complete' => + { + 'MAINTAINER' => 'p5p', + 'DISTRIBUTION' => 'FLORA/Term-Complete-1.402.tar.gz', + 'FILES' => q[dist/Term-Complete], + 'UPSTREAM' => 'blead', + }, + 'Term::ReadLine' => { 'MAINTAINER' => 'p5p', @@ -2129,7 +2137,6 @@ use File::Glob qw(:case); lib/Search/Dict.{pm,t} lib/SelectSaver.{pm,t} lib/Symbol.{pm,t} - lib/Term/Complete.{pm,t} lib/Thread.{pm,t} lib/Tie/Array.pm lib/Tie/Array/ diff --git a/lib/Term/Complete.pm b/dist/Term-Complete/lib/Term/Complete.pm similarity index 100% rename from lib/Term/Complete.pm rename to dist/Term-Complete/lib/Term/Complete.pm diff --git a/lib/Term/Complete.t b/dist/Term-Complete/t/Complete.t similarity index 97% rename from lib/Term/Complete.t rename to dist/Term-Complete/t/Complete.t index 7386474..b24863e 100644 --- a/lib/Term/Complete.t +++ b/dist/Term-Complete/t/Complete.t @@ -1,19 +1,14 @@ #!./perl -BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; -} - use warnings; use Test::More tests => 8; use vars qw( $Term::Complete::complete $complete $Term::Complete::stty ); SKIP: { skip('PERL_SKIP_TTY_TEST', 8) if $ENV{PERL_SKIP_TTY_TEST}; - + use_ok( 'Term::Complete' ); - + # this skips tests AND prevents the "used only once" warning skip('No stty, Term::Complete will not run here', 7) unless defined $Term::Complete::tty_raw_noecho && @@ -32,7 +27,7 @@ SKIP: { Complete('', \@words); my $data = get_expected('fro', @words); - + # there should be an \a after our word like( $$out, qr/fro\a/, 'found bell character' ); diff --git a/lib/.gitignore b/lib/.gitignore index db67151..9594994 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -346,11 +346,7 @@ /Storable.pm /Switch.pm /Sys -/Term/ANSIColor.pm -/Term/Cap.pm -/Term/UI.pm -/Term/UI/History.pm -/Term/ReadLine.pm +/Term /Test.pm /Test/Builder /Test/Builder.pm -- 2.7.4