Closed
Description
This clipboard test in InteractiveUtils is failing with the following error:
Expression: clipboard() == ""
--
| SystemError: GetClipboardData: Invalid clipboard format
| Stacktrace:
| [1] windowserror(p::Symbol, code::UInt32; extrainfo::Nothing)
| @ Base .\error.jl:191
| [2] windowserror(p::Symbol, code::UInt32)
| @ Base .\error.jl:191
| [3] cleanup
| @ C:\buildkite-agent\builds\win2k22-amdci6-4\julialang\julia-master\julia-9fd408723a\share\julia\stdlib\v1.9\InteractiveUtils\src\clipboard.jl:118 [inlined]
| [4] clipboard()
| @ InteractiveUtils C:\buildkite-agent\builds\win2k22-amdci6-4\julialang\julia-master\julia-9fd408723a\share\julia\stdlib\v1.9\InteractiveUtils\src\clipboard.jl:125
| [5] macro expansion
| @ C:\buildkite-agent\builds\win2k22-amdci6-4\julialang\julia-master\julia-9fd408723a\share\julia\stdlib\v1.9\Test\src\Test.jl:477 [inlined]
| [6] top-level scope
| @ C:\buildkite-agent\builds\win2k22-amdci6-4\julialang\julia-master\julia-9fd408723a\share\julia\stdlib\v1.9\InteractiveUtils\test\runtests.jl:584
Manually running this on one of the new buildkite workers, I can confirm that clearing the clipboard and then attempting to get the clipboard throws an error, rather than returning an empty string:
julia> clipboard("something")
@test clipboard() == "something"
ccall((:OpenClipboard, "user32"), stdcall, Cint, (Ptr{Cvoid},), C_NULL) == 0 && Base.windowserror("OpenClipboard")
try
ccall((:EmptyClipboard, "user32"), stdcall, Cint, ()) == 0 && Base.windowserror("EmptyClipboard")
finally
ccall((:CloseClipboard, "user32"), stdcall, Cint, ()) == 0 && Base.windowserror("CloseClipboard")
end
clipboard()
ERROR: SystemError: GetClipboardData: Invalid clipboard format
Stacktrace:
[1] windowserror(p::Symbol, code::UInt32; extrainfo::Nothing)
@ Base .\error.jl:191
[2] windowserror(p::Symbol, code::UInt32)
@ Base .\error.jl:191
[3] cleanup
@ C:\Program Files\Julia-1.8.0\share\julia\stdlib\v1.8\InteractiveUtils\src\clipboard.jl:118 [inlined]
[4] clipboard()
@ InteractiveUtils C:\Program Files\Julia-1.8.0\share\julia\stdlib\v1.8\InteractiveUtils\src\clipboard.jl:125
[5] top-level scope
@ REPL[17]:9