about summary refs log tree commit diff
path: root/src/compiletest/runtest.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiletest/runtest.rs')
-rw-r--r--src/compiletest/runtest.rs10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/compiletest/runtest.rs b/src/compiletest/runtest.rs
index 5de93c52029..a97d4913440 100644
--- a/src/compiletest/runtest.rs
+++ b/src/compiletest/runtest.rs
@@ -104,7 +104,7 @@ fn run_cfail_test(config: &Config, props: &TestProps, testfile: &Path) {
         if !props.error_patterns.is_empty() {
             fatal("both error pattern and expected errors specified");
         }
-        check_expected_errors(expected_errors, testfile, &proc_res);
+        check_expected_errors(props, expected_errors, testfile, &proc_res);
     } else {
         check_error_patterns(props, testfile, output_to_check.as_slice(), &proc_res);
     }
@@ -941,7 +941,8 @@ fn check_forbid_output(props: &TestProps,
     }
 }
 
-fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
+fn check_expected_errors(props: &TestProps,
+                         expected_errors: Vec<errors::ExpectedError> ,
                          testfile: &Path,
                          proc_res: &ProcRes) {
 
@@ -996,6 +997,11 @@ fn check_expected_errors(expected_errors: Vec<errors::ExpectedError> ,
             was_expected = true;
         }
 
+        if line.starts_with("<command line option>") &&
+           props.ignore_command_line {
+            was_expected = true;
+        }
+
         if !was_expected && is_compiler_error_or_warning(line) {
             fatal_proc_rec(format!("unexpected compiler error or warning: '{}'",
                                   line).as_slice(),