File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ function detectavi(io)
105
105
seekstart (io)
106
106
magic = ascii (read (io, UInt8, 4 ))
107
107
magic == " RIFF" || return false
108
- seek (s , 8 )
108
+ seek (io , 8 )
109
109
submagic = ascii (read (io, UInt8, 4 ))
110
110
111
111
submagic == " AVI "
Original file line number Diff line number Diff line change @@ -293,6 +293,15 @@ context("Multiple Magic bytes") do
293
293
end
294
294
end
295
295
context (" AVI Detection" ) do
296
+ open (joinpath (file_dir, " bees.avi" )) do s
297
+ @fact FileIO. detectavi (s) --> true
298
+ end
299
+ open (joinpath (file_dir, " sin.wav" )) do s
300
+ @fact FileIO. detectavi (s) --> false
301
+ end
302
+ open (joinpath (file_dir, " magic1.tiff" )) do s
303
+ @fact FileIO. detectavi (s) --> false
304
+ end
296
305
q = query (joinpath (file_dir, " bees.avi" ))
297
306
@fact typeof (q) --> File{format " AVI" }
298
307
end
You can’t perform that action at this time.
0 commit comments