Skip to content

Commit 9a5ae50

Browse files
authored
Merge pull request #46 from johnnychen94/jc/render
correct the rendermode for txt images
2 parents 0471560 + 485f02a commit 9a5ae50

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ReferenceTests"
22
uuid = "324d217c-45ce-50fc-942e-d289b448e8cf"
33
authors = ["Christof Stocker <stocker.christof@gmail.com>", "Lyndon White <oxinabox@ucc.asn.au>"]
4-
version = "0.8.3"
4+
version = "0.8.4"
55

66
[deps]
77
DeepDiffs = "ab62b9b5-e342-54a8-a765-a90f495de1a6"

src/render.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ default_rendermode(::Type{<:DataFormat}, ::AbstractArray{<:Colorant}) = BeforeAf
5757
default_rendermode(::Type{DataFormat{:TXT}}, ::Any) = Diff()
5858
default_rendermode(::Type{DataFormat{:TXT}}, ::AbstractString) = Diff()
5959
default_rendermode(::Type{DataFormat{:TXT}}, ::Number) = BeforeAfterFull()
60-
default_rendermode(::Type{DataFormat{:TXT}}, ::AbstractArray{<:Colorant}) = BeforeAfterFull()
60+
default_rendermode(::Type{DataFormat{:TXT}}, ::AbstractArray{<:Colorant}) = BeforeAfterImage()
6161

6262
# SHA256
6363
default_rendermode(::Type{DataFormat{:SHA256}}, ::Any) = BeforeAfterFull()

test/runtests.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ if isinteractive()
66
@info ("In interactive use, one should respond \"n\" when the program"
77
* " offers to create or replace files associated with some tests.")
88
else
9-
@info ("Nine tests should correctly report failure in the transcript"
9+
@info ("Ten tests should correctly report failure in the transcript"
1010
* " (but not the test summary).")
1111
end
1212
# check for ambiguities
@@ -77,6 +77,7 @@ end
7777

7878
@testset "images as txt using ImageInTerminal" begin
7979
#@test_throws MethodError @test_reference "references/fail.txt" rand(2,2)
80+
@test_throws ErrorException @test_reference "references/camera_new.txt" camera size=(5,10)
8081
@test_reference "references/camera.txt" camera size=(5,10)
8182
@test_reference "references/lena.txt" lena
8283
end

0 commit comments

Comments
 (0)