Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ ImageCore = "a09fc81d-aa75-5fe9-8630-4744c3626534"
LazyModules = "8cdb02fc-e678-4876-92c5-9defec4f444e"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
SHA = "ea8e919c-243c-51af-8825-aaa63cd721ce"
Sixel = "45858cf5-a6b0-47a3-bbea-62219f50df47"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
XTermColors = "c8c2cc18-de81-4e68-b407-38a3a0c0491f"

[compat]
BSON = "0.3"
Colors = "0.10 - 0.13"
CSVFiles = "1"
Colors = "0.10 - 0.13"
DataFrames = "0.21 - 0.22, 1"
DeepDiffs = "1"
Distances = "0.7 - 0.10"
Expand All @@ -28,6 +29,7 @@ ImageMagick = "0.7, 1"
ImageTransformations = "0.8 - 0.10"
LazyModules = "0.3"
Plots = "= 1.39.0"
Sixel = "0.1.3"
TestImages = "0.6, 1"
XTermColors = "0.2"
julia = "1.6"
Expand Down
1 change: 1 addition & 0 deletions src/ReferenceTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ using FileIO
using SHA
using DeepDiffs
using Random
using Sixel

export
@withcolor,
Expand Down
18 changes: 11 additions & 7 deletions src/render.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,17 @@ function render_item(::BeforeAfterImage, item)
println(io, "eltype: ", eltype(item))
println(io, "size: ", map(length, axes(item)))
println(io, "thumbnail:")
strs = @withcolor XTermColors.ascii_show(
item,
Base.invokelatest(XTermColors.TermColor8bit),
:small,
(20, 40)
)
print(io, join(strs, '\n'))
if Base.get_bool_env("REFERENCETESTS_SIXEL", false)
sixel_encode(io, item)
else
strs = @withcolor XTermColors.ascii_show(
item,
Base.invokelatest(XTermColors.TermColor8bit),
:small,
(20, 40)
)
print(io, join(strs, '\n'))
end
read(io, String)
end

Expand Down
Loading