perlapp perltest subtest));
@EXPORT_OK = (@Test::More::EXPORT_OK, qw(bldtop_dir bldtop_file
srctop_dir srctop_file
- data_file
+ data_file data_dir
pipe with cmdstr quotify
openssl_versions));
=over 4
+=item B<data_dir LIST>
+
+LIST is a list of directories that make up a path from the data directory
+associated with the test (see L</DESCRIPTION> above).
+C<data_dir> returns the resulting directory as a string, adapted to the local
+operating system.
+
+=back
+
+=cut
+
+sub data_dir {
+ return __data_dir(@_);
+}
+
+=over 4
+
=item B<data_file LIST, FILENAME>
LIST is a list of directories that make up a path from the data directory
return catfile($directories{SRCDATA},@_,$f);
}
+sub __data_dir {
+ BAIL_OUT("Must run setup() first") if (! $test_name);
+
+ return catdir($directories{SRCDATA},@_);
+}
+
sub __results_file {
BAIL_OUT("Must run setup() first") if (! $test_name);