Bugzilla – Attachment 68453 Details for
Bug 19512
Koha::File - wrapper/utility routines for file handling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19512: silence noise when KOHA_PATH undefined.
Bug-19512-silence-noise-when-KOHAPATH-undefined.patch (text/plain), 2.00 KB, created by
Mark Tompsett
on 2017-10-23 23:26:45 UTC
(
hide
)
Description:
Bug 19512: silence noise when KOHA_PATH undefined.
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-10-23 23:26:45 UTC
Size:
2.00 KB
patch
obsolete
>From de2a3fff6755641917afd9679c91e3c46823afeb Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Mon, 23 Oct 2017 18:57:55 +0000 >Subject: [PATCH] Bug 19512: silence noise when KOHA_PATH undefined. > >If you run the tests with KOHA_PATH unset, this bombs. >Apply the patch, and it copes by guessing the current >directory. > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > t/Koha/Exceptions/File.t | 5 +++-- > t/Koha/File.t | 5 +++-- > 2 files changed, 6 insertions(+), 4 deletions(-) > >diff --git a/t/Koha/Exceptions/File.t b/t/Koha/Exceptions/File.t >index ddca7f0..79e99b5 100644 >--- a/t/Koha/Exceptions/File.t >+++ b/t/Koha/Exceptions/File.t >@@ -9,7 +9,8 @@ use Koha::Exceptions::File; > #file diagnostics are more throughly tested in t/Koha/File.t > subtest "Catch File-exception and inspect diagnostics", \&getDiagnostics; > sub getDiagnostics { >- my $file = $ENV{KOHA_PATH}.'/kohaversion.pl'; >+ my $koha_path= $ENV{KOHA_PATH} // q{.}; >+ my $file = $koha_path . '/kohaversion.pl'; > my $parentDir = File::Basename::dirname($file); > try { > Koha::Exceptions::File->throw(error => "error", path => $file); >@@ -19,7 +20,7 @@ sub getDiagnostics { > like($e->stat, qr/^\w+/, "Then the file diagnostics look legit"); > }; > >- $file = $ENV{KOHA_PATH}.'/koha-aversion.pl'; >+ $file = $koha_path . '/koha-aversion.pl'; > try { > Koha::Exceptions::File->throw(error => "error", path => $file); > ok(0, "??Why no throw exception??"); >diff --git a/t/Koha/File.t b/t/Koha/File.t >index 8ad2a71..76e03a2 100644 >--- a/t/Koha/File.t >+++ b/t/Koha/File.t >@@ -5,8 +5,9 @@ use Koha::File; > > subtest "Test file diagnostic", \&getDiagnostics; > sub getDiagnostics { >- _testDiagnostics($ENV{KOHA_PATH}.'/kohaversion.pl', '-'); >- _testDiagnostics($ENV{KOHA_PATH}.'/xt', 'd'); >+ my $koha_path = $ENV{KOHA_PATH} // q{.}; >+ _testDiagnostics($koha_path . '/kohaversion.pl', '-'); >+ _testDiagnostics($koha_path . '/xt', 'd'); > } > > >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19512
:
68384
|
68452
| 68453 |
68454