Not less ugly but more temporary: can we maybe extend the pattern list in the `filetype_extensions.conf` used for the unittests on the fly? I.e. using `sed` or so to only add a special unittest pattern during execution of the test suite. This way it would not be in the repository and not in releases.
On the other hand, this adds another piece of hidden magic.