parsetext: add test infrastructure for next_clause