test: move test code into submodule