Selaa lähdekoodia

Fix tests with an empty NPTest.cache file

The NPTest.cache cannot be loaded when empty, and this prevents
getting the data and populating the file. This patch skips the file when
empty as if it didn't exist.
Thomas Guyot-Sionnest 12 vuotta sitten
vanhempi
commit
ae2a540129
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      NPTest.pm

+ 1 - 1
NPTest.pm

@@ -438,7 +438,7 @@ sub LoadCache
 
 
     chomp($fileContents);
     chomp($fileContents);
     my( $contentsRef ) = eval $fileContents;
     my( $contentsRef ) = eval $fileContents;
-    %CACHE = %{$contentsRef};
+    %CACHE = %{$contentsRef} if (defined($contentsRef));
 
 
   }
   }