Skip to content

Commit 38b2347

Browse files
committed
Modify tests to also use fileio_* version of functions
1 parent 32cb8cb commit 38b2347

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/loadsave.jl

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@ module TestLoadSave
77
import FileIO: File, @format_str
88
load(file::File{format"PBMText"}) = "PBMText"
99
load(file::File{format"PBMBinary"}) = "PBMBinary"
10-
load(file::File{format"HDF5"}) = "HDF5"
1110
load(file::File{format"JLD"}) = "JLD"
1211
load(file::File{format"GZIP"}) = "GZIP"
1312
end
13+
module TestLoadSave2
14+
import FileIO: File, @format_str
15+
fileio_load(file::File{format"HDF5"}) = "HDF5"
16+
end
1417

1518
sym2loader = copy(FileIO.sym2loader)
1619
sym2saver = copy(FileIO.sym2saver)
@@ -23,7 +26,7 @@ try
2326

2427
add_loader(format"PBMText", :TestLoadSave)
2528
add_loader(format"PBMBinary", :TestLoadSave)
26-
add_loader(format"HDF5", :TestLoadSave)
29+
add_loader(format"HDF5", :TestLoadSave2)
2730
add_loader(format"JLD", :TestLoadSave)
2831
add_loader(format"GZIP", :TestLoadSave)
2932

@@ -285,12 +288,12 @@ load(f::File{format"AmbigExt2"}) = open(f) do io
285288
read(stream(io), String)
286289
end
287290

288-
save(f::File{format"AmbigExt1"}, testdata) = open(f, "w") do io
291+
fileio_save(f::File{format"AmbigExt1"}, testdata) = open(f, "w") do io
289292
s = stream(io)
290293
print(s, "ambigext1")
291294
print(s, testdata)
292295
end
293-
save(f::File{format"AmbigExt2"}, testdata) = open(f, "w") do io
296+
fileio_save(f::File{format"AmbigExt2"}, testdata) = open(f, "w") do io
294297
s = stream(io)
295298
print(s, "ambigext2")
296299
print(s, testdata)

0 commit comments

Comments
 (0)