compiletest: Support forbid-output in UI tests
This commit is contained in:
parent
32c8a9f49d
commit
5a8ecc9518
1 changed files with 4 additions and 2 deletions
|
|
@ -145,12 +145,13 @@ impl TestCx<'_> {
|
|||
self.fatal_proc_rec("test run succeeded!", &proc_res);
|
||||
}
|
||||
|
||||
let output_to_check = self.get_output(&proc_res);
|
||||
if !self.props.error_patterns.is_empty() || !self.props.regex_error_patterns.is_empty()
|
||||
{
|
||||
// "// error-pattern" comments
|
||||
let output_to_check = self.get_output(&proc_res);
|
||||
self.check_all_error_patterns(&output_to_check, &proc_res, pm);
|
||||
}
|
||||
self.check_forbid_output(&output_to_check, &proc_res)
|
||||
}
|
||||
|
||||
debug!(
|
||||
|
|
@ -181,11 +182,12 @@ impl TestCx<'_> {
|
|||
);
|
||||
self.fatal(&msg);
|
||||
}
|
||||
let output_to_check = self.get_output(&proc_res);
|
||||
if check_patterns {
|
||||
// "// error-pattern" comments
|
||||
let output_to_check = self.get_output(&proc_res);
|
||||
self.check_all_error_patterns(&output_to_check, &proc_res, pm);
|
||||
}
|
||||
self.check_forbid_output(&output_to_check, &proc_res);
|
||||
|
||||
if self.props.run_rustfix && self.config.compare_mode.is_none() {
|
||||
// And finally, compile the fixed code and make sure it both
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue