add unit test code for gen.py
add generate by markdown text
add gen.py test by markdown text