Add failing test for gh-6025
Only allow '>>>' prompt without space afterwards if line is blank

Closes gh-6025
Merge pull request #6027 from takluyver/i6025

Only allow >>> prompt without space afterwards if line is blank