diff options
| author | clubby789 <jamie@hill-daniel.co.uk> | 2024-12-25 00:06:07 +0000 |
|---|---|---|
| committer | clubby789 <jamie@hill-daniel.co.uk> | 2024-12-25 00:06:07 +0000 |
| commit | 5a8ecc951846594407c561ae2015fe2fde1a0694 (patch) | |
| tree | b0d2b1db4ab8d849563595061f92942faecadc98 | |
| parent | 32c8a9f49d5b753ccb0aee2fd1f7a232a9c5baf3 (diff) | |
| download | rust-5a8ecc951846594407c561ae2015fe2fde1a0694.tar.gz rust-5a8ecc951846594407c561ae2015fe2fde1a0694.zip | |
compiletest: Support `forbid-output` in UI tests
| -rw-r--r-- | src/tools/compiletest/src/runtest/ui.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/tools/compiletest/src/runtest/ui.rs b/src/tools/compiletest/src/runtest/ui.rs index 172b1e32aad..10528de427d 100644 --- a/src/tools/compiletest/src/runtest/ui.rs +++ b/src/tools/compiletest/src/runtest/ui.rs @@ -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 |
