Skip to content

Commit 5b5689d

Browse files
committed
Test that processes that are supposed to fail return a non-zero status
1 parent b07968d commit 5b5689d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/test/compiletest/runtest.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,10 @@ fn check_error_patterns(props: &test_props, testfile: &str,
180180
fatal("no error pattern specified in " + testfile);
181181
}
182182

183+
if procres.status == 0 {
184+
fatal("process did not return an error status");
185+
}
186+
183187
let next_err_idx = 0u;
184188
let next_err_pat = props.error_patterns[next_err_idx];
185189
for line: str in str::split(procres.stdout, '\n' as u8) {

0 commit comments

Comments
 (0)