From 2da4611d5bd135fe1bbcbc17570a02df7934e6f4 Mon Sep 17 00:00:00 2001 From: dbs Date: Thu, 3 Mar 2011 06:04:25 +0000 Subject: [PATCH] Enable MFHD tests to find their testdata When the MFHD tests wrapped in mfhd.t are invoked from outside of the directory, they tests failed to find the mfhddata.txt file. Judicious use of the __FILE__ special literal and File::Basename::dirname() avoids that problem. Now we just need to munge @INC to ensure that testlib.pm can be resolved (and hope that no conflicts ever turn up). git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_1@19568 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/test/mfhd.t | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/test/mfhd.t b/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/test/mfhd.t index 35d86cdecf..e6dcf44a1f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/test/mfhd.t +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/test/mfhd.t @@ -4,6 +4,7 @@ use strict; use warnings; use Data::Dumper; use Test::More 'no_plan'; +use File::Basename qw(dirname); use MARC::Record; use OpenILS::Utils::MFHD; @@ -30,7 +31,8 @@ sub right_answer { my $rec; my @captions; -open(my $testdata, "new($rec); -- 2.11.0