Rewrite test_parse_qual

Shorter and more comprehensive test