Add test case for top-level statement support

* Since top-level statement can not be treated in a normal way, its' test cases
  are added into INTERNAL.rst
* test_doc.py is also adjusted so that the command lines in INTERNAL.rst can be
  executed