GetEmitOutput function and testfiles

you need to capture this as well as part of 'syntacticDiganostics' or in a different category: globalDiagnostics, and check on it later on