Mock jl_generating_output as true in tests.
This seems like a good idea and should help boost test coverage.
It does change behavior a little though, as _jl_generating_output() will get called at macro expansion time rather than checking as part of the generated code. for instance, if I have
function foo()
@suppress_out println("hello")
end
then _jl_generating_output() will get called when foo is compiled and replaced with a static true or false.
I'm not 100% sure under what conditions ccall(:jl_generating_output, Cint, ()) returns 0 or 1 so I don't know if this is a problem in practice, but it seems like it should check each time foo is called.
I think what we'd want is something more like !($(_jl_generating_output)()), or maybe !Suppressor._jl_generating_output()