[tests] Support checking compiler stderr output
Test for #2991