What is your workflow for updating failed diagnostic expectations in tests?

a workflow question regarding testing and diagnostics: when i'm adding new tests to the compiler which are expected to produce diagnostics, or change something that alters existing such tests, i generally find that i have to spend a decent amount of time copy-pasting strings from failed test console output back into the test expectations. is copy-pasting the best approach here, or are there utilities/settings that can be used to, say, update failed diagnostic expectations based on console output or something along those lines. what workflow do you use for this process?