|
1 |
| -// Copyright 2013 The Rust Project Developers. See the COPYRIGHT |
| 1 | +// Copyright 2013-2014 The Rust Project Developers. See the COPYRIGHT |
2 | 2 | // file at the top-level directory of this distribution and at
|
3 | 3 | // http://rust-lang.org/COPYRIGHT.
|
4 | 4 | //
|
@@ -268,24 +268,25 @@ pub fn find_testable_code(doc: &str, tests: &mut ::test::Collector) {
|
268 | 268 | extern fn block(_ob: *buf, text: *buf, lang: *buf, opaque: *libc::c_void) {
|
269 | 269 | unsafe {
|
270 | 270 | if text.is_null() { return }
|
271 |
| - let (should_fail, no_run, ignore) = if lang.is_null() { |
272 |
| - (false, false, false) |
| 271 | + let (should_fail, no_run, ignore, notrust) = if lang.is_null() { |
| 272 | + (false, false, false, false) |
273 | 273 | } else {
|
274 | 274 | slice::raw::buf_as_slice((*lang).data,
|
275 | 275 | (*lang).size as uint, |lang| {
|
276 | 276 | let s = str::from_utf8(lang).unwrap();
|
277 | 277 | (s.contains("should_fail"),
|
278 | 278 | s.contains("no_run"),
|
279 |
| - s.contains("ignore") || s.contains("notrust")) |
| 279 | + s.contains("ignore"), |
| 280 | + s.contains("notrust")) |
280 | 281 | })
|
281 | 282 | };
|
282 |
| - if ignore { return } |
| 283 | + if notrust { return } |
283 | 284 | slice::raw::buf_as_slice((*text).data, (*text).size as uint, |text| {
|
284 | 285 | let tests = &mut *(opaque as *mut ::test::Collector);
|
285 | 286 | let text = str::from_utf8(text).unwrap();
|
286 | 287 | let mut lines = text.lines().map(|l| stripped_filtered_line(l).unwrap_or(l));
|
287 | 288 | let text = lines.collect::<~[&str]>().connect("\n");
|
288 |
| - tests.add_test(text, should_fail, no_run); |
| 289 | + tests.add_test(text, should_fail, no_run, ignore); |
289 | 290 | })
|
290 | 291 | }
|
291 | 292 | }
|
|
0 commit comments