graydon/rust — Issue #1049: Allow tests to be ignored conditionally
Author: brson
Created: 2011-10-19 23:38:50+00:00
State: open
Labels: easy, feature, front, test, unassigned

Right now we can ignore a test like

```
#[test]
#[ignore]
fn test() { }
```

But to ignore it only on windows you've got to do
```
#[test]
#[cfg(target_os = "win32")]
fn test() { }

#[test]
#[cfg(target_os = "macos")]
#[cfg(target_os = "linux")]
fn test() { }
```

We should just be able to do this

```
#[test]
#[ignore(target_os = "win32")]
fn test() { {}
```

Where the thing insider `ignore()` is just matched against all configuration items in the compilation environment