Skip to content

Commit f5743ed

Browse files
committed
workaround for JuliaLang/julia#43787
1 parent 39b9aab commit f5743ed

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/NarrativeTest.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ function runtests(files; subs=common_subs(), mod=nothing, quiet=false)
377377
if res isa Union{Fail, Error}
378378
quiet || print(stderr, CLRL)
379379
print(SEPARATOR)
380-
display(res)
380+
show(stdout, MIME"text/plain"(), res)
381381
end
382382
passed += res isa Pass
383383
failed += res isa Fail
@@ -391,7 +391,7 @@ function runtests(files; subs=common_subs(), mod=nothing, quiet=false)
391391
if !success
392392
print(SEPARATOR)
393393
end
394-
quiet || display(summary)
394+
quiet || show(stdout, MIME"text/plain"(), summary)
395395
quiet || println(stderr, success ? SUCCESS : FAILURE)
396396
return success
397397
end
@@ -420,7 +420,7 @@ function testset(files = nothing; default=common_args(), subs=common_subs(), mod
420420
ts.anynonpass = true
421421
quiet || print(stderr, CLRL)
422422
print(SEPARATOR)
423-
display(res)
423+
show(stdout, MIME"text/plain"(), res)
424424
end
425425
end
426426
quiet || print(stderr, CLRL)

test/runtests.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
using NarrativeTest
44

5+
# Workaround for https://github.com/JuliaLang/julia/pull/43787.
6+
function Base.display(d::TextDisplay, M::MIME"text/plain", @nospecialize x)
7+
show(d.io, M, x)
8+
end
9+
510
# Handle filesystem paths under Windows.
611
subs = NarrativeTest.common_subs()
712
if Sys.iswindows()

0 commit comments

Comments
 (0)