tests: move handling of None "el" out of linematch()
It just seems odd for linematch() to know what None means.
Differential Revision: https://phab.mercurial-scm.org/D3879
#require docutils gettext $ $TESTDIR/check-gendoc ru checking for parse errors