How to write an 'expected failure test'

Hi devs,

I want to write a test that expected to fail. And I want to check the error message. But I found that if the command exit code is not 0, then the test will fail. Also, if I add XFAIL: *, it will not check the command line output … Can someone help me?

Most tests like this use the ‘not’ prefix in their ‘RUN’ line. Note that you may want to redirect stderr independently for these tests.

Hi Brian
Thank you very much, this helps a lot!

在 2019年2月23日週六 上午12:16,Brian Cain <> 寫道: