ext/File-DosGlob/t/DosGlob.t See if File::DosGlob works
ext/File-Find/lib/File/Find.pm Routines to do a find
ext/File-Find/t/find.t See if File::Find works
+ext/File-Find/t/lib/Testing.pm Functions used in testing File-find
ext/File-Find/t/taint.t See if File::Find works with taint
ext/File-Glob/bsd_glob.c File::Glob extension run time code
ext/File-Glob/bsd_glob.h File::Glob extension header file
use Test::More;
plan tests => $test_count;
+use lib qw( ./t/lib );
+use Testing qw(
+ create_file_ok
+ mkdir_ok
+ symlink_ok
+);
my %Expect_File = (); # what we expect for $_
my %Expect_Name = (); # what we expect for $File::Find::name/fullname
cleanup();
}
-# Wrappers around Test::More::ok() for creation of files, directories and
-# symlinks used in testing
-
-sub create_file_ok($;$) {
- my $file = $_[0];
- my $msg = $_[2] || "able to create file: $file";
- ok( open(my $T,'>',$file), $msg )
- or die("Unable to create file: $file");
-}
-
-sub mkdir_ok($$;$) {
- my ($dir, $mask) = @_[0..1];
- my $msg = $_[2] || "able to mkdir: $dir";
- ok( mkdir($dir, $mask), $msg )
- or die("Unable to mkdir: $dir");
-}
-
-sub symlink_ok($$;$) {
- my ($oldfile, $newfile) = @_[0..1];
- my $msg = $_[2] || "able to symlink from $oldfile to $newfile";
- ok( symlink( $oldfile, $newfile ), $msg)
- or die("Unable to symlink from $oldfile to $newfile");
-}
-
sub wanted_File_Dir {
print "# \$File::Find::dir => '$File::Find::dir'\t\$_ => '$_'\n";
s#\.$## if ($^O eq 'VMS' && $_ ne '.'); #
--- /dev/null
+package Testing;
+use 5.006_001;
+use strict;
+use warnings;
+require Exporter;
+our @ISA = qw(Exporter);
+our @EXPORT_OK = qw(
+ create_file_ok
+ mkdir_ok
+ symlink_ok
+);
+
+# Wrappers around Test::More::ok() for creation of files, directories and
+# symlinks used in testing of File-Find
+
+*ok = \&Test::More::ok;
+
+sub create_file_ok($;$) {
+ my $file = $_[0];
+ my $msg = $_[2] || "able to create file: $file";
+ ok( open(my $T,'>',$file), $msg )
+ or die("Unable to create file: $file");
+}
+
+sub mkdir_ok($$;$) {
+ my ($dir, $mask) = @_[0..1];
+ my $msg = $_[2] || "able to mkdir: $dir";
+ ok( mkdir($dir, $mask), $msg )
+ or die("Unable to mkdir: $dir");
+}
+
+sub symlink_ok($$;$) {
+ my ($oldfile, $newfile) = @_[0..1];
+ my $msg = $_[2] || "able to symlink from $oldfile to $newfile";
+ ok( symlink( $oldfile, $newfile ), $msg)
+ or die("Unable to symlink from $oldfile to $newfile");
+}
+
+1;
: (skip_all => "A perl without taint support")
);
}
+use lib qw( ./t/lib );
+use Testing qw(
+ create_file_ok
+ mkdir_ok
+ symlink_ok
+);
my %Expect_File = (); # what we expect for $_
my %Expect_Name = (); # what we expect for $File::Find::name/fullname
cleanup();
}
-sub create_file_ok($;$) {
- my $file = $_[0];
- my $msg = $_[2] || "able to create file: $file";
- ok( open(my $T,'>',$file), $msg )
- or die("Unable to create file: $file");
-}
-
-sub mkdir_ok($$;$) {
- my ($dir, $mask) = @_[0..1];
- my $msg = $_[2] || "able to mkdir: $dir";
- ok( mkdir($dir, $mask), $msg )
- or die("Unable to mkdir: $dir");
-}
-
sub wanted_File_Dir {
print "# \$File::Find::dir => '$File::Find::dir'\t\$_ => '$_'\n";
s#\.$## if ($^O eq 'VMS' && $_ ne '.'); #
#!./perl -w
-# Test the well-formed-ness of the MANIFEST file.
+# What does this test?
+# This tests the well-formed-ness of the MANIFEST file.
+#
+# Why do we test this?
+# TK
+#
+# It's broken - how do I fix it?
+# If MANIFEST is not sorted properly, you will get this error output:
+# got ''MANIFEST' is NOT sorted properly
+# # '
+# # expected /(?^:is sorted properly)/
+#
+# To correct this, run either:
+#
+# ./perl -Ilib Porting/manisort -o MANIFEST MANIFEST
+#
+# which will output "'MANIFEST' is NOT sorted properly" but which will
+# correct the problem; or:
+#
+# make manifest
+#
+# which will output "WARNING: re-sorting MANIFEST" but which will also
+# correct the problem.
BEGIN {
@INC = '..' if -f '../TestInit.pm';
#!./perl
+# What does this test?
+# This test executes Porting/pod_rules.pl and reports the result of that
+# program.
+#
+# Why do we test this?
+# Among other reasons, to check the well-formed-ness of these files:
+# win32/makefile.mk
+# MANIFEST
+# win32/Makefile
+# win32/pod.mak
+# Makefile.SH
+# vms/descrip_mms.template
+#
+# It's broken - how do I fix it?
+# If MANIFEST fails the 'up to date' test, it will probably also fail
+# t/porting/manifest.t as well. Follow instructions in that file for
+# correcting the MANIFEST. When that file passes, the MANIFEST check in this
+# file will probably pass as well.
+
BEGIN {
chdir '..' unless -d 't';
unshift @INC, 'lib';