I think you could move this test into `test-spawn.c` and use `init_process_options` function which does absolutely the same.