Testing for docstring

question

#1

How can I test that a macro assigns the right docstring to an object? MWE (without the macro, just the test):

"My docstring"
immutable MyType end

@doc(MyType) == doc"My docstring" # false, how can I make it true?

#2
repr(@doc(MyType))

Have also a look to test/docs.jl in Julia code, there is another solution based on show and Markdown MIME