[PATCH 3/3] reg/tests: Compare 'query' test output with expected output