diff --git a/MANIFEST b/MANIFEST index 685ef6c3..2ad9e625 100644 --- a/MANIFEST +++ b/MANIFEST @@ -127,31 +127,398 @@ LICENSE-ARTISTIC2 LICENSE-BSD2 LICENSE-GPL2 Makefile.PL -MANIFEST This list of files +MANIFEST MANIFEST.SKIP META.yml README.pod -t/cat.t -t/compile.t +t/000.basic.t +t/addbib/000.basic.t +t/addbib/910.meta.t +t/addbib/990.pod.t +t/apply/000.basic.t +t/apply/910.meta.t +t/apply/990.pod.t +t/ar/000.basic.t +t/ar/910.meta.t +t/ar/990.pod.t +t/arch/000.basic.t +t/arch/910.meta.t +t/arch/990.pod.t +t/arithmetic/000.basic.t +t/arithmetic/910.meta.t +t/arithmetic/990.pod.t +t/asa/000.basic.t +t/asa/910.meta.t +t/asa/990.pod.t +t/awk/000.basic.t +t/awk/910.meta.t +t/awk/990.pod.t +t/banner/000.basic.t +t/banner/910.meta.t +t/banner/990.pod.t +t/base64/000.basic.t +t/base64/910.meta.t +t/base64/990.pod.t +t/basename/000.basic.t +t/basename/910.meta.t +t/basename/990.pod.t +t/bc/000.basic.t +t/bc/910.meta.t +t/bc/990.pod.t +t/cal/000.basic.t +t/cal/910.meta.t +t/cal/990.pod.t +t/cat/000.basic.t +t/cat/910.meta.t +t/cat/990.pod.t +t/cat/cat.t +t/chgrp/000.basic.t +t/chgrp/910.meta.t +t/chgrp/990.pod.t +t/ching/000.basic.t +t/ching/910.meta.t +t/ching/990.pod.t +t/chmod/000.basic.t +t/chmod/910.meta.t +t/chmod/990.pod.t +t/chown/000.basic.t +t/chown/910.meta.t +t/chown/990.pod.t +t/clear/000.basic.t +t/clear/910.meta.t +t/clear/990.pod.t +t/cmp/000.basic.t +t/cmp/910.meta.t +t/cmp/990.pod.t +t/col/000.basic.t +t/col/910.meta.t +t/col/990.pod.t +t/colrm/000.basic.t +t/colrm/910.meta.t +t/colrm/990.pod.t +t/comm/000.basic.t +t/comm/910.meta.t +t/comm/990.pod.t +t/cp/000.basic.t +t/cp/910.meta.t +t/cp/990.pod.t +t/cut/000.basic.t +t/cut/910.meta.t +t/cut/990.pod.t t/data/cat/cat-n-1.txt t/data/nl/nl.txt t/data/rev/reverse-this.txt t/data/sort/ints1.txt t/data/sort/letters1.txt t/data/sort/three-words.txt -t/date.t -t/echo.t -t/factor.t -t/false.t -t/find.t +t/date/000.basic.t +t/date/910.meta.t +t/date/990.pod.t +t/date/date.t +t/dc/000.basic.t +t/dc/910.meta.t +t/dc/990.pod.t +t/deroff/000.basic.t +t/deroff/910.meta.t +t/deroff/990.pod.t +t/diff/000.basic.t +t/diff/910.meta.t +t/diff/990.pod.t +t/dirname/000.basic.t +t/dirname/910.meta.t +t/dirname/990.pod.t +t/du/000.basic.t +t/du/910.meta.t +t/du/990.pod.t +t/echo/000.basic.t +t/echo/910.meta.t +t/echo/990.pod.t +t/echo/echo.t +t/ed/000.basic.t +t/ed/910.meta.t +t/ed/990.pod.t +t/env/000.basic.t +t/env/910.meta.t +t/env/990.pod.t +t/expand/000.basic.t +t/expand/910.meta.t +t/expand/990.pod.t +t/expr/000.basic.t +t/expr/910.meta.t +t/expr/990.pod.t +t/factor/000.basic.t +t/factor/910.meta.t +t/factor/990.pod.t +t/factor/factor.t +t/false/000.basic.t +t/false/910.meta.t +t/false/990.pod.t +t/false/false.t +t/file/000.basic.t +t/file/910.meta.t +t/file/990.pod.t +t/find/000.basic.t +t/find/910.meta.t +t/find/990.pod.t +t/find/find.t +t/fish/000.basic.t +t/fish/910.meta.t +t/fish/990.pod.t +t/fmt/000.basic.t +t/fmt/910.meta.t +t/fmt/990.pod.t +t/fold/000.basic.t +t/fold/910.meta.t +t/fold/990.pod.t +t/fortune/000.basic.t +t/fortune/910.meta.t +t/fortune/990.pod.t +t/from/000.basic.t +t/from/910.meta.t +t/from/990.pod.t +t/glob/000.basic.t +t/glob/910.meta.t +t/glob/990.pod.t +t/grep/000.basic.t +t/grep/910.meta.t +t/grep/990.pod.t +t/hangman/000.basic.t +t/hangman/910.meta.t +t/hangman/990.pod.t +t/head/000.basic.t +t/head/910.meta.t +t/head/990.pod.t +t/hexdump/000.basic.t +t/hexdump/910.meta.t +t/hexdump/990.pod.t +t/id/000.basic.t +t/id/910.meta.t +t/id/990.pod.t +t/install/000.basic.t +t/install/910.meta.t +t/install/990.pod.t +t/join/000.basic.t +t/join/910.meta.t +t/join/990.pod.t +t/kill/000.basic.t +t/kill/910.meta.t +t/kill/990.pod.t +t/lib/common.pl t/lib/utils.pm -t/nl.t -t/rev.t -t/rot13.t -t/sort.t -t/true.t -t/units.t -t/uudecode.t +t/ln/000.basic.t +t/ln/910.meta.t +t/ln/990.pod.t +t/lock/000.basic.t +t/lock/910.meta.t +t/lock/990.pod.t +t/look/000.basic.t +t/look/910.meta.t +t/look/990.pod.t +t/ls/000.basic.t +t/ls/910.meta.t +t/ls/990.pod.t +t/mail/000.basic.t +t/mail/910.meta.t +t/mail/990.pod.t +t/maze/000.basic.t +t/maze/910.meta.t +t/maze/990.pod.t +t/mimedecode/000.basic.t +t/mimedecode/910.meta.t +t/mimedecode/990.pod.t +t/mkdir/000.basic.t +t/mkdir/910.meta.t +t/mkdir/990.pod.t +t/mkfifo/000.basic.t +t/mkfifo/910.meta.t +t/mkfifo/990.pod.t +t/moo/000.basic.t +t/moo/910.meta.t +t/moo/990.pod.t +t/morse/000.basic.t +t/morse/910.meta.t +t/morse/990.pod.t +t/nl/000.basic.t +t/nl/910.meta.t +t/nl/990.pod.t +t/nl/nl.t +t/od/000.basic.t +t/od/910.meta.t +t/od/990.pod.t +t/par/000.basic.t +t/par/910.meta.t +t/par/990.pod.t +t/paste/000.basic.t +t/paste/910.meta.t +t/paste/990.pod.t +t/patch/000.basic.t +t/patch/910.meta.t +t/patch/990.pod.t +t/perldoc/000.basic.t +t/perldoc/910.meta.t +t/perldoc/990.pod.t +t/perlpowertools/000.basic.t +t/perlpowertools/910.meta.t +t/perlpowertools/990.pod.t +t/pig/000.basic.t +t/pig/910.meta.t +t/pig/990.pod.t +t/ping/000.basic.t +t/ping/910.meta.t +t/ping/990.pod.t +t/pom/000.basic.t +t/pom/910.meta.t +t/pom/990.pod.t +t/ppt/000.basic.t +t/ppt/910.meta.t +t/ppt/990.pod.t +t/pr/000.basic.t +t/pr/910.meta.t +t/pr/990.pod.t +t/primes/000.basic.t +t/primes/910.meta.t +t/primes/990.pod.t +t/printenv/000.basic.t +t/printenv/910.meta.t +t/printenv/990.pod.t +t/printf/000.basic.t +t/printf/910.meta.t +t/printf/990.pod.t +t/pwd/000.basic.t +t/pwd/910.meta.t +t/pwd/990.pod.t +t/rain/000.basic.t +t/rain/910.meta.t +t/rain/990.pod.t +t/random/000.basic.t +t/random/910.meta.t +t/random/990.pod.t +t/rev/000.basic.t +t/rev/910.meta.t +t/rev/990.pod.t +t/rev/rev.t +t/rm/000.basic.t +t/rm/910.meta.t +t/rm/990.pod.t +t/rmdir/000.basic.t +t/rmdir/910.meta.t +t/rmdir/990.pod.t +t/robots/000.basic.t +t/robots/910.meta.t +t/robots/990.pod.t +t/rot13/000.basic.t +t/rot13/910.meta.t +t/rot13/990.pod.t +t/rot13/rot13.t +t/shar/000.basic.t +t/shar/910.meta.t +t/shar/990.pod.t +t/sleep/000.basic.t +t/sleep/910.meta.t +t/sleep/990.pod.t +t/sort/000.basic.t +t/sort/910.meta.t +t/sort/990.pod.t +t/sort/sort.t +t/spell/000.basic.t +t/spell/910.meta.t +t/spell/990.pod.t +t/split/000.basic.t +t/split/910.meta.t +t/split/990.pod.t +t/strings/000.basic.t +t/strings/910.meta.t +t/strings/990.pod.t +t/sum/000.basic.t +t/sum/910.meta.t +t/sum/990.pod.t +t/tac/000.basic.t +t/tac/910.meta.t +t/tac/990.pod.t +t/tail/000.basic.t +t/tail/910.meta.t +t/tail/990.pod.t +t/tar/000.basic.t +t/tar/910.meta.t +t/tar/990.pod.t +t/tee/000.basic.t +t/tee/910.meta.t +t/tee/990.pod.t +t/test/000.basic.t +t/test/910.meta.t +t/test/990.pod.t +t/time/000.basic.t +t/time/910.meta.t +t/time/990.pod.t +t/touch/000.basic.t +t/touch/910.meta.t +t/touch/990.pod.t +t/tr/000.basic.t +t/tr/910.meta.t +t/tr/990.pod.t +t/true/000.basic.t +t/true/910.meta.t +t/true/990.pod.t +t/true/true.t +t/tsort/000.basic.t +t/tsort/910.meta.t +t/tsort/990.pod.t +t/tty/000.basic.t +t/tty/910.meta.t +t/tty/990.pod.t +t/uname/000.basic.t +t/uname/910.meta.t +t/uname/990.pod.t +t/unexpand/000.basic.t +t/unexpand/910.meta.t +t/unexpand/990.pod.t +t/uniq/000.basic.t +t/uniq/910.meta.t +t/uniq/990.pod.t +t/units/000.basic.t +t/units/910.meta.t +t/units/990.pod.t +t/units/units.t +t/unpar/000.basic.t +t/unpar/910.meta.t +t/unpar/990.pod.t +t/unshar/000.basic.t +t/unshar/910.meta.t +t/unshar/990.pod.t +t/uudecode/000.basic.t +t/uudecode/910.meta.t +t/uudecode/990.pod.t +t/uudecode/uudecode.t +t/uuencode/000.basic.t +t/uuencode/910.meta.t +t/uuencode/990.pod.t +t/wc/000.basic.t +t/wc/910.meta.t +t/wc/990.pod.t +t/what/000.basic.t +t/what/910.meta.t +t/what/990.pod.t +t/which/000.basic.t +t/which/910.meta.t +t/which/990.pod.t +t/whoami/000.basic.t +t/whoami/910.meta.t +t/whoami/990.pod.t +t/whois/000.basic.t +t/whois/910.meta.t +t/whois/990.pod.t +t/words/000.basic.t +t/words/910.meta.t +t/words/990.pod.t +t/wump/000.basic.t +t/wump/910.meta.t +t/wump/990.pod.t +t/xargs/000.basic.t +t/xargs/910.meta.t +t/xargs/990.pod.t +t/yes/000.basic.t +t/yes/910.meta.t +t/yes/990.pod.t xt/changes.t xt/perlcritic.t xt/perlcriticrc diff --git a/bin/ar b/bin/ar index 33399001..2413b78f 100755 --- a/bin/ar +++ b/bin/ar @@ -7,6 +7,8 @@ Description: create and maintain library archives Author: dkulp License: perl +=end metadata + =cut use POSIX qw(strftime); @@ -18,9 +20,6 @@ if ($ARGV[0] !~ /^\-/) { $ARGV[0] = '-' . $ARGV[0]; } require "getopts.pl"; Getopts("dmpqrtxabciouv"); -=end metadata - -=cut # take only one of the following major opts if (($opt_d + $opt_m + $opt_p + $opt_q + $opt_r + $opt_t + $opt_x) != 1) { diff --git a/bin/awk b/bin/awk index 816e2cac..cf9623c1 100755 --- a/bin/awk +++ b/bin/awk @@ -17,7 +17,7 @@ License: perl use strict; -BEGIN { +SANITY: { my $external_module = 'App::a2p'; my $rc = eval "require $external_module; $external_module->import; 1"; die "This program needs the $external_module module.\n" unless $rc; diff --git a/bin/date b/bin/date index 33e7c0e5..54f2389c 100755 --- a/bin/date +++ b/bin/date @@ -346,7 +346,7 @@ please open an issue: L. If you look in the C file, you'll see a simple text list at the end that we use for Windows. -=se back +=back =cut diff --git a/bin/mimedecode b/bin/mimedecode index 75eeb83b..4d77926d 100755 --- a/bin/mimedecode +++ b/bin/mimedecode @@ -14,14 +14,14 @@ License: use v5.12.0; use Getopt::Std; -BEGIN { +SANITY: { my $external_module = 'MIME::Parser'; my $rc = eval "require $external_module; $external_module->import; 1"; die "This program needs the $external_module module.\n" unless $rc; } {package PerlPowerTools::MIME::Parser; - use base 'MIME::Parser'; +push @INC, 'MIME::Parser'; # this is old school so -c doesn't complain sub new_body_for { diff --git a/bin/perlpowertools b/bin/perlpowertools index 21f081e6..1b1d6cfa 100755 --- a/bin/perlpowertools +++ b/bin/perlpowertools @@ -2,6 +2,17 @@ # # perlpowertools - helper script for PerlPowerTools +=begin metadata + +Name: perlpowertools +Description: a program launcher for Perl Power Tools +Author: kal247, https://github.com/kal247 +License: artistic2 + +=end metadata + +=cut + use strict; use warnings; use utf8; diff --git a/t/000.basic.t b/t/000.basic.t new file mode 100644 index 00000000..809b7611 --- /dev/null +++ b/t/000.basic.t @@ -0,0 +1,29 @@ +use Test::More 1; + +use File::Basename; +use File::Spec::Functions; + +my @programs = + map { basename($_) } + grep { ! /\.bat\z/ } + glob( 'blib/script/*' ); + +my @expected_test_files = + map { basename($_) } + glob( catfile( qw(util test_templates *.t) ) ); + +foreach my $program ( @programs ) { + test_dir($program); + } + +done_testing(); + +sub test_dir { + my( $program ) = @_; + ok -d catfile( 't', $program ), "t/$program is a directory"; + + foreach my $t_file ( @expected_test_files ) { + ok -e catfile( 't', $program, $t_file ), "Found test file $t_file"; + } + } + diff --git a/t/addbib/000.basic.t b/t/addbib/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/addbib/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/addbib/910.meta.t b/t/addbib/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/addbib/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/addbib/990.pod.t b/t/addbib/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/addbib/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/apply/000.basic.t b/t/apply/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/apply/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/apply/910.meta.t b/t/apply/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/apply/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/apply/990.pod.t b/t/apply/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/apply/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/ar/000.basic.t b/t/ar/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/ar/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/ar/910.meta.t b/t/ar/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/ar/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/ar/990.pod.t b/t/ar/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/ar/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/arch/000.basic.t b/t/arch/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/arch/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/arch/910.meta.t b/t/arch/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/arch/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/arch/990.pod.t b/t/arch/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/arch/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/arithmetic/000.basic.t b/t/arithmetic/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/arithmetic/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/arithmetic/910.meta.t b/t/arithmetic/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/arithmetic/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/arithmetic/990.pod.t b/t/arithmetic/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/arithmetic/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/asa/000.basic.t b/t/asa/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/asa/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/asa/910.meta.t b/t/asa/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/asa/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/asa/990.pod.t b/t/asa/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/asa/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/awk/000.basic.t b/t/awk/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/awk/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/awk/910.meta.t b/t/awk/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/awk/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/awk/990.pod.t b/t/awk/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/awk/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/banner/000.basic.t b/t/banner/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/banner/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/banner/910.meta.t b/t/banner/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/banner/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/banner/990.pod.t b/t/banner/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/banner/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/base64/000.basic.t b/t/base64/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/base64/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/base64/910.meta.t b/t/base64/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/base64/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/base64/990.pod.t b/t/base64/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/base64/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/basename/000.basic.t b/t/basename/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/basename/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/basename/910.meta.t b/t/basename/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/basename/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/basename/990.pod.t b/t/basename/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/basename/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/bc/000.basic.t b/t/bc/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/bc/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/bc/910.meta.t b/t/bc/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/bc/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/bc/990.pod.t b/t/bc/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/bc/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/cal/000.basic.t b/t/cal/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/cal/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/cal/910.meta.t b/t/cal/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/cal/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/cal/990.pod.t b/t/cal/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/cal/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/cat/000.basic.t b/t/cat/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/cat/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/cat/910.meta.t b/t/cat/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/cat/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/cat/990.pod.t b/t/cat/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/cat/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/cat.t b/t/cat/cat.t similarity index 100% rename from t/cat.t rename to t/cat/cat.t diff --git a/t/chgrp/000.basic.t b/t/chgrp/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/chgrp/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/chgrp/910.meta.t b/t/chgrp/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/chgrp/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/chgrp/990.pod.t b/t/chgrp/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/chgrp/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/ching/000.basic.t b/t/ching/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/ching/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/ching/910.meta.t b/t/ching/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/ching/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/ching/990.pod.t b/t/ching/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/ching/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/chmod/000.basic.t b/t/chmod/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/chmod/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/chmod/910.meta.t b/t/chmod/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/chmod/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/chmod/990.pod.t b/t/chmod/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/chmod/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/chown/000.basic.t b/t/chown/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/chown/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/chown/910.meta.t b/t/chown/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/chown/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/chown/990.pod.t b/t/chown/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/chown/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/clear/000.basic.t b/t/clear/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/clear/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/clear/910.meta.t b/t/clear/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/clear/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/clear/990.pod.t b/t/clear/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/clear/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/cmp/000.basic.t b/t/cmp/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/cmp/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/cmp/910.meta.t b/t/cmp/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/cmp/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/cmp/990.pod.t b/t/cmp/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/cmp/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/col/000.basic.t b/t/col/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/col/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/col/910.meta.t b/t/col/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/col/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/col/990.pod.t b/t/col/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/col/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/colrm/000.basic.t b/t/colrm/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/colrm/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/colrm/910.meta.t b/t/colrm/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/colrm/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/colrm/990.pod.t b/t/colrm/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/colrm/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/comm/000.basic.t b/t/comm/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/comm/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/comm/910.meta.t b/t/comm/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/comm/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/comm/990.pod.t b/t/comm/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/comm/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/compile.t b/t/compile.t deleted file mode 100644 index 760f616e..00000000 --- a/t/compile.t +++ /dev/null @@ -1,36 +0,0 @@ -use Test::More 0.94; -use Config; - -use File::Basename; -use File::Spec::Functions; - -diag( - join "\n\t", "Parent \@INC:", @INC, '' - ); - -$ENV{PERL5LIB} = join $Config{path_sep}, @INC; -diag( "PERL5LIB: $ENV{PERL5LIB}" ) if $ENV{DEBUG}; - -my @programs = grep { ! /\.bat\z/ } glob( 'blib/script/*' ); - -my %NeedsExternalModule = map { $_ => 1 } qw(awk find mimedecode); - -foreach my $program ( @programs ) { - my $command = qq("$^X" -c $program 2>&1); - my $test = sub { - my $output = `$command`; - like( $output, qr/syntax OK/, "$program compiles" ); - }; - - if( exists $NeedsExternalModule{basename($program)} ) { - TODO: { - local $TODO = "The program <$program> requires an external module, so fresh environments may fail."; - subtest $program => $test; - } - next; - } - - subtest $program => $test; - } - -done_testing(); diff --git a/t/cp/000.basic.t b/t/cp/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/cp/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/cp/910.meta.t b/t/cp/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/cp/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/cp/990.pod.t b/t/cp/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/cp/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/cut/000.basic.t b/t/cut/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/cut/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/cut/910.meta.t b/t/cut/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/cut/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/cut/990.pod.t b/t/cut/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/cut/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/date/000.basic.t b/t/date/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/date/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/date/910.meta.t b/t/date/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/date/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/date/990.pod.t b/t/date/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/date/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/date.t b/t/date/date.t similarity index 100% rename from t/date.t rename to t/date/date.t diff --git a/t/dc/000.basic.t b/t/dc/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/dc/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/dc/910.meta.t b/t/dc/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/dc/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/dc/990.pod.t b/t/dc/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/dc/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/deroff/000.basic.t b/t/deroff/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/deroff/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/deroff/910.meta.t b/t/deroff/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/deroff/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/deroff/990.pod.t b/t/deroff/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/deroff/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/diff/000.basic.t b/t/diff/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/diff/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/diff/910.meta.t b/t/diff/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/diff/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/diff/990.pod.t b/t/diff/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/diff/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/dirname/000.basic.t b/t/dirname/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/dirname/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/dirname/910.meta.t b/t/dirname/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/dirname/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/dirname/990.pod.t b/t/dirname/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/dirname/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/du/000.basic.t b/t/du/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/du/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/du/910.meta.t b/t/du/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/du/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/du/990.pod.t b/t/du/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/du/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/echo/000.basic.t b/t/echo/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/echo/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/echo/910.meta.t b/t/echo/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/echo/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/echo/990.pod.t b/t/echo/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/echo/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/echo.t b/t/echo/echo.t similarity index 100% rename from t/echo.t rename to t/echo/echo.t diff --git a/t/ed/000.basic.t b/t/ed/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/ed/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/ed/910.meta.t b/t/ed/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/ed/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/ed/990.pod.t b/t/ed/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/ed/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/env/000.basic.t b/t/env/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/env/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/env/910.meta.t b/t/env/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/env/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/env/990.pod.t b/t/env/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/env/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/expand/000.basic.t b/t/expand/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/expand/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/expand/910.meta.t b/t/expand/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/expand/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/expand/990.pod.t b/t/expand/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/expand/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/expr/000.basic.t b/t/expr/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/expr/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/expr/910.meta.t b/t/expr/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/expr/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/expr/990.pod.t b/t/expr/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/expr/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/factor/000.basic.t b/t/factor/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/factor/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/factor/910.meta.t b/t/factor/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/factor/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/factor/990.pod.t b/t/factor/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/factor/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/factor.t b/t/factor/factor.t similarity index 100% rename from t/factor.t rename to t/factor/factor.t diff --git a/t/false/000.basic.t b/t/false/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/false/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/false/910.meta.t b/t/false/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/false/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/false/990.pod.t b/t/false/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/false/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/false.t b/t/false/false.t similarity index 100% rename from t/false.t rename to t/false/false.t diff --git a/t/file/000.basic.t b/t/file/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/file/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/file/910.meta.t b/t/file/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/file/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/file/990.pod.t b/t/file/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/file/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/find/000.basic.t b/t/find/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/find/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/find/910.meta.t b/t/find/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/find/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/find/990.pod.t b/t/find/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/find/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/find.t b/t/find/find.t similarity index 100% rename from t/find.t rename to t/find/find.t diff --git a/t/fish/000.basic.t b/t/fish/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/fish/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/fish/910.meta.t b/t/fish/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/fish/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/fish/990.pod.t b/t/fish/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/fish/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/fmt/000.basic.t b/t/fmt/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/fmt/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/fmt/910.meta.t b/t/fmt/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/fmt/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/fmt/990.pod.t b/t/fmt/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/fmt/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/fold/000.basic.t b/t/fold/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/fold/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/fold/910.meta.t b/t/fold/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/fold/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/fold/990.pod.t b/t/fold/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/fold/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/fortune/000.basic.t b/t/fortune/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/fortune/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/fortune/910.meta.t b/t/fortune/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/fortune/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/fortune/990.pod.t b/t/fortune/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/fortune/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/from/000.basic.t b/t/from/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/from/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/from/910.meta.t b/t/from/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/from/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/from/990.pod.t b/t/from/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/from/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/glob/000.basic.t b/t/glob/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/glob/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/glob/910.meta.t b/t/glob/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/glob/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/glob/990.pod.t b/t/glob/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/glob/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/grep/000.basic.t b/t/grep/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/grep/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/grep/910.meta.t b/t/grep/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/grep/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/grep/990.pod.t b/t/grep/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/grep/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/hangman/000.basic.t b/t/hangman/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/hangman/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/hangman/910.meta.t b/t/hangman/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/hangman/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/hangman/990.pod.t b/t/hangman/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/hangman/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/head/000.basic.t b/t/head/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/head/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/head/910.meta.t b/t/head/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/head/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/head/990.pod.t b/t/head/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/head/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/hexdump/000.basic.t b/t/hexdump/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/hexdump/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/hexdump/910.meta.t b/t/hexdump/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/hexdump/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/hexdump/990.pod.t b/t/hexdump/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/hexdump/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/id/000.basic.t b/t/id/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/id/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/id/910.meta.t b/t/id/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/id/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/id/990.pod.t b/t/id/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/id/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/install/000.basic.t b/t/install/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/install/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/install/910.meta.t b/t/install/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/install/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/install/990.pod.t b/t/install/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/install/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/join/000.basic.t b/t/join/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/join/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/join/910.meta.t b/t/join/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/join/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/join/990.pod.t b/t/join/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/join/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/kill/000.basic.t b/t/kill/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/kill/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/kill/910.meta.t b/t/kill/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/kill/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/kill/990.pod.t b/t/kill/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/kill/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/lib/common.pl b/t/lib/common.pl new file mode 100644 index 00000000..1af4bac5 --- /dev/null +++ b/t/lib/common.pl @@ -0,0 +1,46 @@ + +use File::Basename qw(basename dirname); +use File::Spec::Functions qw(catfile); + +use Test::More; +use Test::Warnings qw(had_no_warnings); + +sub compile_test { + my( $program ) = @_; + + subtest compile => sub { + return fail( "Program <$program> exists" ) + unless -e $program; + pass( "Program <$program> exists" ); + my $output = `"$^X" -c "$program" 2>&1`; + like $output, qr/syntax OK/, "$program compiles" + or diag( $output ); + }; + } + +sub program_name { + my( $file ) = defined $_[0] ? $_[0] : (caller(0))[1]; + catfile 'bin', basename( dirname( $file ) ); + } + +sub sanity_test { + my( $file ) = (caller(0))[1]; + my $program = program_name($file); + + $ENV{PERL5LIB} = join $Config{path_sep}, @INC; + diag( "PERL5LIB: $ENV{PERL5LIB}" ) if $ENV{DEBUG}; + + my $rc = subtest 'sanity_test' => sub { + compile_test($program); + }; + + unless($rc) { + done_testing(); + note "No sense continuing after sanity tests fail\n"; + CORE::exit 255; + } + + $rc; + } + +1; diff --git a/t/ln/000.basic.t b/t/ln/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/ln/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/ln/910.meta.t b/t/ln/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/ln/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/ln/990.pod.t b/t/ln/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/ln/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/lock/000.basic.t b/t/lock/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/lock/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/lock/910.meta.t b/t/lock/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/lock/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/lock/990.pod.t b/t/lock/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/lock/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/look/000.basic.t b/t/look/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/look/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/look/910.meta.t b/t/look/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/look/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/look/990.pod.t b/t/look/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/look/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/ls/000.basic.t b/t/ls/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/ls/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/ls/910.meta.t b/t/ls/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/ls/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/ls/990.pod.t b/t/ls/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/ls/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/mail/000.basic.t b/t/mail/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/mail/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/mail/910.meta.t b/t/mail/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/mail/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/mail/990.pod.t b/t/mail/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/mail/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/maze/000.basic.t b/t/maze/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/maze/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/maze/910.meta.t b/t/maze/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/maze/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/maze/990.pod.t b/t/maze/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/maze/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/mimedecode/000.basic.t b/t/mimedecode/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/mimedecode/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/mimedecode/910.meta.t b/t/mimedecode/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/mimedecode/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/mimedecode/990.pod.t b/t/mimedecode/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/mimedecode/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/mkdir/000.basic.t b/t/mkdir/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/mkdir/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/mkdir/910.meta.t b/t/mkdir/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/mkdir/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/mkdir/990.pod.t b/t/mkdir/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/mkdir/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/mkfifo/000.basic.t b/t/mkfifo/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/mkfifo/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/mkfifo/910.meta.t b/t/mkfifo/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/mkfifo/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/mkfifo/990.pod.t b/t/mkfifo/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/mkfifo/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/moo/000.basic.t b/t/moo/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/moo/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/moo/910.meta.t b/t/moo/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/moo/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/moo/990.pod.t b/t/moo/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/moo/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/morse/000.basic.t b/t/morse/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/morse/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/morse/910.meta.t b/t/morse/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/morse/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/morse/990.pod.t b/t/morse/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/morse/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/nl/000.basic.t b/t/nl/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/nl/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/nl/910.meta.t b/t/nl/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/nl/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/nl/990.pod.t b/t/nl/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/nl/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/nl.t b/t/nl/nl.t similarity index 100% rename from t/nl.t rename to t/nl/nl.t diff --git a/t/od/000.basic.t b/t/od/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/od/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/od/910.meta.t b/t/od/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/od/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/od/990.pod.t b/t/od/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/od/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/par/000.basic.t b/t/par/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/par/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/par/910.meta.t b/t/par/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/par/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/par/990.pod.t b/t/par/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/par/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/paste/000.basic.t b/t/paste/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/paste/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/paste/910.meta.t b/t/paste/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/paste/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/paste/990.pod.t b/t/paste/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/paste/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/patch/000.basic.t b/t/patch/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/patch/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/patch/910.meta.t b/t/patch/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/patch/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/patch/990.pod.t b/t/patch/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/patch/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/perldoc/000.basic.t b/t/perldoc/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/perldoc/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/perldoc/910.meta.t b/t/perldoc/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/perldoc/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/perldoc/990.pod.t b/t/perldoc/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/perldoc/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/perlpowertools/000.basic.t b/t/perlpowertools/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/perlpowertools/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/perlpowertools/910.meta.t b/t/perlpowertools/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/perlpowertools/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/perlpowertools/990.pod.t b/t/perlpowertools/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/perlpowertools/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/pig/000.basic.t b/t/pig/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/pig/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/pig/910.meta.t b/t/pig/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/pig/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/pig/990.pod.t b/t/pig/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/pig/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/ping/000.basic.t b/t/ping/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/ping/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/ping/910.meta.t b/t/ping/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/ping/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/ping/990.pod.t b/t/ping/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/ping/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/pom/000.basic.t b/t/pom/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/pom/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/pom/910.meta.t b/t/pom/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/pom/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/pom/990.pod.t b/t/pom/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/pom/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/ppt/000.basic.t b/t/ppt/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/ppt/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/ppt/910.meta.t b/t/ppt/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/ppt/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/ppt/990.pod.t b/t/ppt/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/ppt/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/pr/000.basic.t b/t/pr/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/pr/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/pr/910.meta.t b/t/pr/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/pr/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/pr/990.pod.t b/t/pr/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/pr/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/primes/000.basic.t b/t/primes/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/primes/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/primes/910.meta.t b/t/primes/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/primes/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/primes/990.pod.t b/t/primes/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/primes/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/printenv/000.basic.t b/t/printenv/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/printenv/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/printenv/910.meta.t b/t/printenv/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/printenv/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/printenv/990.pod.t b/t/printenv/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/printenv/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/printf/000.basic.t b/t/printf/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/printf/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/printf/910.meta.t b/t/printf/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/printf/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/printf/990.pod.t b/t/printf/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/printf/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/pwd/000.basic.t b/t/pwd/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/pwd/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/pwd/910.meta.t b/t/pwd/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/pwd/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/pwd/990.pod.t b/t/pwd/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/pwd/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/rain/000.basic.t b/t/rain/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/rain/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/rain/910.meta.t b/t/rain/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/rain/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/rain/990.pod.t b/t/rain/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/rain/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/random/000.basic.t b/t/random/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/random/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/random/910.meta.t b/t/random/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/random/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/random/990.pod.t b/t/random/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/random/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/rev/000.basic.t b/t/rev/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/rev/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/rev/910.meta.t b/t/rev/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/rev/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/rev/990.pod.t b/t/rev/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/rev/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/rev.t b/t/rev/rev.t similarity index 100% rename from t/rev.t rename to t/rev/rev.t diff --git a/t/rm/000.basic.t b/t/rm/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/rm/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/rm/910.meta.t b/t/rm/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/rm/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/rm/990.pod.t b/t/rm/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/rm/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/rmdir/000.basic.t b/t/rmdir/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/rmdir/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/rmdir/910.meta.t b/t/rmdir/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/rmdir/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/rmdir/990.pod.t b/t/rmdir/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/rmdir/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/robots/000.basic.t b/t/robots/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/robots/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/robots/910.meta.t b/t/robots/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/robots/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/robots/990.pod.t b/t/robots/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/robots/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/rot13/000.basic.t b/t/rot13/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/rot13/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/rot13/910.meta.t b/t/rot13/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/rot13/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/rot13/990.pod.t b/t/rot13/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/rot13/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/rot13.t b/t/rot13/rot13.t similarity index 100% rename from t/rot13.t rename to t/rot13/rot13.t diff --git a/t/shar/000.basic.t b/t/shar/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/shar/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/shar/910.meta.t b/t/shar/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/shar/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/shar/990.pod.t b/t/shar/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/shar/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/sleep/000.basic.t b/t/sleep/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/sleep/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/sleep/910.meta.t b/t/sleep/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/sleep/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/sleep/990.pod.t b/t/sleep/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/sleep/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/sort/000.basic.t b/t/sort/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/sort/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/sort/910.meta.t b/t/sort/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/sort/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/sort/990.pod.t b/t/sort/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/sort/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/sort.t b/t/sort/sort.t similarity index 100% rename from t/sort.t rename to t/sort/sort.t diff --git a/t/spell/000.basic.t b/t/spell/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/spell/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/spell/910.meta.t b/t/spell/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/spell/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/spell/990.pod.t b/t/spell/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/spell/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/split/000.basic.t b/t/split/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/split/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/split/910.meta.t b/t/split/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/split/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/split/990.pod.t b/t/split/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/split/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/strings/000.basic.t b/t/strings/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/strings/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/strings/910.meta.t b/t/strings/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/strings/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/strings/990.pod.t b/t/strings/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/strings/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/sum/000.basic.t b/t/sum/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/sum/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/sum/910.meta.t b/t/sum/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/sum/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/sum/990.pod.t b/t/sum/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/sum/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/tac/000.basic.t b/t/tac/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/tac/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/tac/910.meta.t b/t/tac/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/tac/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/tac/990.pod.t b/t/tac/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/tac/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/tail/000.basic.t b/t/tail/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/tail/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/tail/910.meta.t b/t/tail/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/tail/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/tail/990.pod.t b/t/tail/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/tail/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/tar/000.basic.t b/t/tar/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/tar/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/tar/910.meta.t b/t/tar/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/tar/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/tar/990.pod.t b/t/tar/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/tar/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/tee/000.basic.t b/t/tee/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/tee/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/tee/910.meta.t b/t/tee/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/tee/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/tee/990.pod.t b/t/tee/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/tee/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/test/000.basic.t b/t/test/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/test/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/test/910.meta.t b/t/test/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/test/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/test/990.pod.t b/t/test/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/test/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/time/000.basic.t b/t/time/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/time/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/time/910.meta.t b/t/time/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/time/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/time/990.pod.t b/t/time/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/time/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/touch/000.basic.t b/t/touch/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/touch/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/touch/910.meta.t b/t/touch/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/touch/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/touch/990.pod.t b/t/touch/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/touch/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/tr/000.basic.t b/t/tr/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/tr/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/tr/910.meta.t b/t/tr/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/tr/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/tr/990.pod.t b/t/tr/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/tr/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/true/000.basic.t b/t/true/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/true/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/true/910.meta.t b/t/true/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/true/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/true/990.pod.t b/t/true/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/true/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/true.t b/t/true/true.t similarity index 100% rename from t/true.t rename to t/true/true.t diff --git a/t/tsort/000.basic.t b/t/tsort/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/tsort/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/tsort/910.meta.t b/t/tsort/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/tsort/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/tsort/990.pod.t b/t/tsort/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/tsort/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/tty/000.basic.t b/t/tty/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/tty/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/tty/910.meta.t b/t/tty/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/tty/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/tty/990.pod.t b/t/tty/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/tty/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/uname/000.basic.t b/t/uname/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/uname/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/uname/910.meta.t b/t/uname/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/uname/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/uname/990.pod.t b/t/uname/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/uname/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/unexpand/000.basic.t b/t/unexpand/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/unexpand/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/unexpand/910.meta.t b/t/unexpand/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/unexpand/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/unexpand/990.pod.t b/t/unexpand/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/unexpand/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/uniq/000.basic.t b/t/uniq/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/uniq/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/uniq/910.meta.t b/t/uniq/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/uniq/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/uniq/990.pod.t b/t/uniq/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/uniq/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/units/000.basic.t b/t/units/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/units/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/units/910.meta.t b/t/units/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/units/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/units/990.pod.t b/t/units/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/units/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/units.t b/t/units/units.t similarity index 100% rename from t/units.t rename to t/units/units.t diff --git a/t/unpar/000.basic.t b/t/unpar/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/unpar/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/unpar/910.meta.t b/t/unpar/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/unpar/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/unpar/990.pod.t b/t/unpar/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/unpar/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/unshar/000.basic.t b/t/unshar/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/unshar/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/unshar/910.meta.t b/t/unshar/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/unshar/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/unshar/990.pod.t b/t/unshar/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/unshar/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/uudecode/000.basic.t b/t/uudecode/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/uudecode/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/uudecode/910.meta.t b/t/uudecode/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/uudecode/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/uudecode/990.pod.t b/t/uudecode/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/uudecode/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/uudecode.t b/t/uudecode/uudecode.t similarity index 100% rename from t/uudecode.t rename to t/uudecode/uudecode.t diff --git a/t/uuencode/000.basic.t b/t/uuencode/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/uuencode/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/uuencode/910.meta.t b/t/uuencode/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/uuencode/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/uuencode/990.pod.t b/t/uuencode/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/uuencode/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/wc/000.basic.t b/t/wc/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/wc/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/wc/910.meta.t b/t/wc/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/wc/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/wc/990.pod.t b/t/wc/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/wc/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/what/000.basic.t b/t/what/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/what/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/what/910.meta.t b/t/what/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/what/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/what/990.pod.t b/t/what/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/what/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/which/000.basic.t b/t/which/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/which/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/which/910.meta.t b/t/which/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/which/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/which/990.pod.t b/t/which/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/which/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/whoami/000.basic.t b/t/whoami/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/whoami/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/whoami/910.meta.t b/t/whoami/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/whoami/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/whoami/990.pod.t b/t/whoami/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/whoami/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/whois/000.basic.t b/t/whois/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/whois/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/whois/910.meta.t b/t/whois/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/whois/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/whois/990.pod.t b/t/whois/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/whois/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/words/000.basic.t b/t/words/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/words/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/words/910.meta.t b/t/words/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/words/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/words/990.pod.t b/t/words/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/words/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/wump/000.basic.t b/t/wump/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/wump/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/wump/910.meta.t b/t/wump/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/wump/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/wump/990.pod.t b/t/wump/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/wump/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/xargs/000.basic.t b/t/xargs/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/xargs/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/xargs/910.meta.t b/t/xargs/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/xargs/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/xargs/990.pod.t b/t/xargs/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/xargs/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/t/yes/000.basic.t b/t/yes/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/t/yes/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/t/yes/910.meta.t b/t/yes/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/t/yes/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/t/yes/990.pod.t b/t/yes/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/t/yes/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing(); diff --git a/util/extract_metadata b/util/extract_metadata new file mode 100755 index 00000000..f5990744 --- /dev/null +++ b/util/extract_metadata @@ -0,0 +1,44 @@ +#!/usr/bin/perl + +use v5.10; +use open qw(:std :utf8); + +my @programs = @ARGV; + +my %grand; + +foreach my $program ( @programs ) { + open my $fh, '<:utf8', $program or do { + warn "Could not open <$file>: $!\n"; + next PROGRAM; + }; + my $data = do { local $/; <$fh> }; + + my( $extracted ) = $data =~ m/ + ^=begin \s+ metadata \s+ + (.+) + ^=end \s+ metadata + /xms; + + my %hash; + foreach my $line ( split /\R/, $extracted ) { + my( $field, $value ) = split /:\s*/, $line, 2; + if( exists $hash{$field} and ! ref $hash{$field} ) { + $hash{$field} = [ $hash{$field}, $value ]; + } + else { + $hash{$field} = $value; + } + } + + if( exists $hash{'Author'} and ! ref $hash{'Author'} ) { + $hash{'Author'} = [ $hash{'Author'} ] + } + + $grand{$program} = \%hash; + } + +use JSON; +my $json = encode_json( \%grand ); + +say $json; diff --git a/util/make_test_files b/util/make_test_files new file mode 100755 index 00000000..55769e5d --- /dev/null +++ b/util/make_test_files @@ -0,0 +1,48 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use utf8; +use v5.16; + +use File::Basename qw(basename); +use File::Path qw(make_path); +use File::Spec::Functions qw(catfile); +use Mojo::File; +use Mojo::Template; + +my @commands = @ARGV; +@commands = glob('bin/*') unless @commands; + +COMMAND: foreach my $bin ( map { basename($_) } @commands ) { + my $target_dir = catfile( 't', $bin ); + say "Processing $target_dir"; + if( -d $target_dir ) { + say "\t$target_dir exists"; + } + + make_path $target_dir; + populate_test_files( $target_dir ); + } + +sub populate_test_files { + state $template_dir = 'util/test_templates'; + my( $target_dir ) = @_; + my $mt = Mojo::Template->new->vars(1); + + FILE: foreach my $file ( glob( "$template_dir/*.t" ) ) { + my $target_file = catfile( $target_dir, basename($file) ); + if( -e $target_file ) { + say STDERR "\t$target_file already exists. Skipping..."; + next FILE; + } + say "\tAdding $target_file"; + + my $template = Mojo::File->new($file)->slurp; + my $cooked = $mt->render($template); + + Mojo::File->new($target_file)->spurt($cooked); + } + } + +__END__ diff --git a/util/test_templates/000.basic.t b/util/test_templates/000.basic.t new file mode 100644 index 00000000..7bfc26a7 --- /dev/null +++ b/util/test_templates/000.basic.t @@ -0,0 +1,10 @@ +use strict; +use warnings; + +use Test::More; + +require './t/lib/common.pl'; + +sanity_test(); + +done_testing(); diff --git a/util/test_templates/910.meta.t b/util/test_templates/910.meta.t new file mode 100644 index 00000000..00af4eb8 --- /dev/null +++ b/util/test_templates/910.meta.t @@ -0,0 +1,25 @@ +#!/usr/bin/perl +use strict; +use warnings; + +use JSON qw(decode_json); +use Test::More; + +require './t/lib/common.pl'; + +my $program = program_name(); +ok -e $program, "$program exists"; + +my $output = `"$^X" util/extract_metadata $program`; +my $json = decode_json( $output ); + +subtest "required keys" => sub { + my $this = $json->{$program}; + my @keys = qw(Name Description Author License); + + ok( exists $this->{$_}, "has $_ key" ) for @keys; + }; + +done_testing(); + +__END__ diff --git a/util/test_templates/990.pod.t b/util/test_templates/990.pod.t new file mode 100644 index 00000000..c66807c3 --- /dev/null +++ b/util/test_templates/990.pod.t @@ -0,0 +1,10 @@ +#!/usr/bin/perl + +use Test::Pod; + +require './t/lib/common.pl'; +my $program = program_name(__FILE__); + +pod_file_ok( $program, "Valid POD in <$program>" ); + +done_testing();