View | Details | Raw Unified | Return to bug 19512
Collapse All | Expand All

(-)a/t/Koha/Exceptions/File.t (-2 / +3 lines)
Lines 9-15 use Koha::Exceptions::File; Link Here
9
#file diagnostics are more throughly tested in t/Koha/File.t
9
#file diagnostics are more throughly tested in t/Koha/File.t
10
subtest "Catch File-exception and inspect diagnostics", \&getDiagnostics;
10
subtest "Catch File-exception and inspect diagnostics", \&getDiagnostics;
11
sub getDiagnostics {
11
sub getDiagnostics {
12
    my $file = $ENV{KOHA_PATH}.'/kohaversion.pl';
12
    my $koha_path= $ENV{KOHA_PATH} // q{.};
13
    my $file = $koha_path . '/kohaversion.pl';
13
    my $parentDir = File::Basename::dirname($file);
14
    my $parentDir = File::Basename::dirname($file);
14
    try {
15
    try {
15
        Koha::Exceptions::File->throw(error => "error", path => $file);
16
        Koha::Exceptions::File->throw(error => "error", path => $file);
Lines 19-25 sub getDiagnostics { Link Here
19
        like($e->stat, qr/^\w+/, "Then the file diagnostics look legit");
20
        like($e->stat, qr/^\w+/, "Then the file diagnostics look legit");
20
    };
21
    };
21
22
22
    $file = $ENV{KOHA_PATH}.'/koha-aversion.pl';
23
    $file = $koha_path . '/koha-aversion.pl';
23
    try {
24
    try {
24
        Koha::Exceptions::File->throw(error => "error", path => $file);
25
        Koha::Exceptions::File->throw(error => "error", path => $file);
25
        ok(0, "??Why no throw exception??");
26
        ok(0, "??Why no throw exception??");
(-)a/t/Koha/File.t (-3 / +3 lines)
Lines 5-12 use Koha::File; Link Here
5
5
6
subtest "Test file diagnostic", \&getDiagnostics;
6
subtest "Test file diagnostic", \&getDiagnostics;
7
sub getDiagnostics {
7
sub getDiagnostics {
8
    _testDiagnostics($ENV{KOHA_PATH}.'/kohaversion.pl',   '-');
8
    my $koha_path = $ENV{KOHA_PATH} // q{.};
9
    _testDiagnostics($ENV{KOHA_PATH}.'/xt',               'd');
9
    _testDiagnostics($koha_path . '/kohaversion.pl',   '-');
10
    _testDiagnostics($koha_path . '/xt',               'd');
10
}
11
}
11
12
12
13
13
- 

Return to bug 19512