Skip to content

Commit e4787f2

Browse files
authored
Merge pull request #785 from jishnub/showfix
Fix `show` for `QuotientSpace`
2 parents 7968dab + d55e833 commit e4787f2

File tree

3 files changed

+15
-3
lines changed

3 files changed

+15
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ApproxFun"
22
uuid = "28f2ccd6-bb30-5033-b560-165f7b14dc2f"
3-
version = "0.13.4"
3+
version = "0.13.5"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/Extras/show.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,13 @@ end
109109
function show(io::IO,s::QuotientSpace)
110110
show(io,s.space)
111111
print(io," /\n")
112-
show(io,s.bcs;header=false)
112+
show(io,s.bcs)
113+
end
114+
115+
function show(io::IO, m::MIME"text/plain", s::QuotientSpace)
116+
show(io,s.space)
117+
print(io," /\n")
118+
show(io, m, s.bcs, header = false)
113119
end
114120

115121

@@ -191,7 +197,7 @@ struct PrintShow
191197
end
192198
Base.show(io::IO,N::PrintShow) = print(io,N.str)
193199

194-
show(io::IO, B::Operator) = summary(io, B)
200+
show(io::IO, B::Operator; kw...) = summary(io, B)
195201

196202
function show(io::IO, ::MIME"text/plain", B::Operator;header::Bool=true)
197203
header && println(io, summarystr(B))

test/runtests.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,4 +227,10 @@ end
227227

228228
@test summary(io, ApproxFun.ArraySpace(Chebyshev(), 2)) isa Nothing
229229
@test contains(String(take!(io)), "ArraySpace")
230+
231+
Q = QuotientSpace(Dirichlet(Chebyshev()))
232+
@test startswith(repr(Q), "Chebyshev() /")
233+
show(io, MIME"text/plain"(), Q)
234+
s = String(take!(io))
235+
@test startswith(s, "Chebyshev() /")
230236
end

0 commit comments

Comments
 (0)