Write test cases for doctest indentation

These are the examples reported in issue #1350.
Write code for doctest indentation
Add "preceding text" test case for doctest indentation