Minor refactoring

Was meant to go with another use of that function, but
that has not materialized after all.
Add simple non-test test file

Right now, this is virtually impossible to test for, but this at least
allows us to share our one-off test hacks. :)