Skip to content

Commit 59b8b01

Browse files
committed
[io] Add test for reading with cache without globalregistration
1 parent f30b676 commit 59b8b01

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

io/io/test/TFileTests.cxx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,15 @@ TEST(TFile, ReadWithoutGlobalRegistrationNet)
141141
const auto netFile = "root://eospublic.cern.ch//eos/root-eos/h1/dstarmb.root";
142142
TestReadWithoutGlobalRegistrationIfPossible(netFile);
143143
}
144+
TEST(TFile, ReadWithCacheWithoutGlobalRegistration)
145+
{
146+
const auto webFile = "http://root.cern/files/h1/dstarmb.root";
147+
TFile::SetCacheFileDir(".");
148+
delete TFile::Open(webFile, "READ_WITHOUT_GLOBALREGISTRATION");
149+
EXPECT_TRUE(gSystem->AccessPathName("./files/h1/dstarmb.root"));
150+
TFile::SetCacheFileDir("");
151+
gSystem->Unlink("./files");
152+
}
144153
#endif
145154
#endif
146155

@@ -295,3 +304,4 @@ TEST(TFile, PersistTObjectStdArray)
295304
}
296305
gSystem->Unlink(filename);
297306
}
307+

0 commit comments

Comments
 (0)