Add header flag to check run-pass test output

This commit is contained in:
nathanwhit 2019-08-22 12:01:37 -04:00 committed by Nathan
parent 201e52e5fe
commit 54f80a5b7c

View File

@ -326,6 +326,8 @@ pub struct TestProps {
pub force_host: bool,
// Check stdout for error-pattern output as well as stderr
pub check_stdout: bool,
// Check stdout & stderr for output of run-pass test
pub check_run_results: bool,
// For UI tests, allows compiler to generate arbitrary output to stdout
pub dont_check_compiler_stdout: bool,
// For UI tests, allows compiler to generate arbitrary output to stderr
@ -388,6 +390,7 @@ pub fn new() -> Self {
build_aux_docs: false,
force_host: false,
check_stdout: false,
check_run_results: false,
dont_check_compiler_stdout: false,
dont_check_compiler_stderr: false,
no_prefer_dynamic: false,
@ -468,6 +471,10 @@ fn load_from(&mut self, testfile: &Path, cfg: Option<&str>, config: &Config) {
self.check_stdout = config.parse_check_stdout(ln);
}
if !self.check_run_results {
self.check_run_results = config.parse_check_run_results(ln);
}
if !self.dont_check_compiler_stdout {
self.dont_check_compiler_stdout = config.parse_dont_check_compiler_stdout(ln);
}
@ -712,6 +719,10 @@ fn parse_check_stdout(&self, line: &str) -> bool {
self.parse_name_directive(line, "check-stdout")
}
fn parse_check_run_results(&self, line: &str) -> bool {
self.parse_name_directive(line, "check-run-results")
}
fn parse_dont_check_compiler_stdout(&self, line: &str) -> bool {
self.parse_name_directive(line, "dont-check-compiler-stdout")
}