@@ -195,13 +195,14 @@ include("debugIO.jl")
195
195
@testset " Symbol Fonts test" begin
196
196
@test begin
197
197
filename= " 431.pdf"
198
+ result, template_file = local_testfiles (filename)
198
199
DEBUG && println (filename)
199
200
isfile (filename) ||
200
201
download (" http://www.stillhq.com/pdfdb/000431/data.pdf" ,filename)
201
202
doc = pdDocOpen (filename)
202
203
(npage = pdDocGetPageCount (doc)) == 54
203
204
try
204
- open (" 431.res " , " w" ) do io
205
+ open (result , " w" ) do io
205
206
for i= 1 : npage
206
207
page = pdDocGetPage (doc, i)
207
208
if pdPageIsEmpty (page) == false
@@ -210,7 +211,7 @@ include("debugIO.jl")
210
211
end
211
212
end
212
213
end
213
- @test files_equal (" 431.res " , " files/431.txt " )
214
+ @test files_equal (result, template_file )
214
215
finally
215
216
pdDocClose (doc)
216
217
end
@@ -220,12 +221,13 @@ include("debugIO.jl")
220
221
221
222
@testset " Inline Image test" begin
222
223
@test begin
223
- filename= " files/Pratham\ Sanskaran.pdf"
224
- DEBUG && println (filename)
225
- doc = pdDocOpen (filename)
226
- (npage = pdDocGetPageCount (doc)) == 54
224
+ filename= " Pratham-Sanskaran.pdf"
225
+ result, template_file, src = local_testfiles (filename)
226
+ DEBUG && println (src)
227
+ doc = pdDocOpen (src)
228
+ (npage = pdDocGetPageCount (doc)) == 3
227
229
try
228
- open (" Pratham \ Sanskaran.res " , " w" ) do io
230
+ open (result , " w" ) do io
229
231
for i= 1 : npage
230
232
page = pdDocGetPage (doc, i)
231
233
if pdPageIsEmpty (page) == false
@@ -234,7 +236,7 @@ include("debugIO.jl")
234
236
end
235
237
end
236
238
end
237
- @test files_equal (" Pratham \ Sanskaran.res " , " files/Pratham \ Sanskaran.txt " )
239
+ @test files_equal (result, template_file )
238
240
finally
239
241
pdDocClose (doc)
240
242
end
@@ -244,12 +246,13 @@ include("debugIO.jl")
244
246
245
247
@testset " MacRomanEncoding Fonts test" begin
246
248
@test begin
247
- filename= " files/spec-2.pdf"
248
- DEBUG && println (filename)
249
- doc = pdDocOpen (filename)
249
+ filename= " spec-2.pdf"
250
+ result, template_file, src = local_testfiles (filename)
251
+ DEBUG && println (src)
252
+ doc = pdDocOpen (src)
250
253
@assert (npage = pdDocGetPageCount (doc)) == 1
251
254
try
252
- open (" spec-2.res " , " w" ) do io
255
+ open (result , " w" ) do io
253
256
for i= 1 : npage
254
257
page = pdDocGetPage (doc, i)
255
258
if pdPageIsEmpty (page) == false
@@ -258,7 +261,7 @@ include("debugIO.jl")
258
261
end
259
262
end
260
263
end
261
- @test files_equal (" spec-2.res " , " files/spec-2.txt " )
264
+ @test files_equal (result, template_file )
262
265
finally
263
266
pdDocClose (doc)
264
267
end
0 commit comments