Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/test_reference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ function test_reference(
rendermode = default_rendermode(F, raw_actual)
end

actual = _convert(F, raw_actual; kw...)
# preprocessing when reference file doesn't exists
if !isfile(path)
println("Reference file for \"$filename\" does not exist.")
# TODO: move encoding out from render
render(rendermode, raw_actual)

if !isinteractive()
Expand All @@ -120,15 +122,14 @@ function test_reference(
@test false
else
mkpath(dir)
savefile(file, raw_actual)
savefile(file, actual)
@info("Please run the tests again for any changes to take effect")
end

return nothing # skip current test case
end

# file exists
actual = _convert(F, raw_actual; kw...)
reference = loadfile(T, file)

if equiv === nothing
Expand Down