GetEmitOutput function and testfiles