[PATCH 2/9] reg/tests: Split 'query' tests from reg.c