tests: add run_code()