Add tests for doctype parsing