Fix interactive code for one-field types (#176)
This commit is contained in:
parent
ab075ca47d
commit
9021985de9
|
@ -17,7 +17,7 @@ Interactively create a plugin of type `T`. Implement this method and ignore othe
|
|||
related functions only if you want completely custom behaviour.
|
||||
"""
|
||||
function interactive(T::Type)
|
||||
pairs = interactive_pairs(T)
|
||||
pairs = Vector{Pair{Symbol, Type}}(interactive_pairs(T))
|
||||
|
||||
# There must be at least 2 MultiSelectMenu options.
|
||||
# If there are none, return immediately.
|
||||
|
|
|
@ -198,6 +198,14 @@ end
|
|||
@test PT.interactive(TagBot) == TagBot(; changelog=nothing)
|
||||
end
|
||||
|
||||
@testset "Only one field" begin
|
||||
print(
|
||||
stdin.buffer,
|
||||
DOWN, CR, DONE, # Select "None" option
|
||||
)
|
||||
@test PT.interactive(Codecov) == Codecov()
|
||||
end
|
||||
|
||||
println()
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue