mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-01 03:03:40 +00:00
fix windows tests
Windows has a different error message than POSIX, so the ui tests fail for the clippy-config-fail tests. This commit splits those tests up in target-os specific subdirectories and extends compile-test.rs to run either of them based on the target os. Here's hope we'll get a green appveyor build.
This commit is contained in:
parent
9a7597d5af
commit
d904a01140
@ -29,4 +29,6 @@ fn compile_test() {
|
||||
prepare_env();
|
||||
run_mode("run-pass", "run-pass");
|
||||
run_mode("ui", "ui");
|
||||
#[cfg(target_os = "windows")] run_mode("ui-windows", "ui");
|
||||
#[cfg(not(target_os = "windows"))] run_mode("ui-posix", "ui");
|
||||
}
|
||||
|
6
tests/ui-windows/conf_bad_toml.rs
Normal file
6
tests/ui-windows/conf_bad_toml.rs
Normal file
@ -0,0 +1,6 @@
|
||||
// error-pattern: error reading Clippy's configuration file
|
||||
|
||||
#![feature(plugin)]
|
||||
#![plugin(clippy(conf_file="./tests/compile-fail/conf_bad_toml.toml"))]
|
||||
|
||||
fn main() {}
|
4
tests/ui-windows/conf_bad_toml.stderr
Normal file
4
tests/ui-windows/conf_bad_toml.stderr
Normal file
@ -0,0 +1,4 @@
|
||||
error: error reading Clippy's configuration file: The system cannot find the file specified. (os error 2)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
2
tests/ui-windows/conf_bad_toml.toml
Normal file
2
tests/ui-windows/conf_bad_toml.toml
Normal file
@ -0,0 +1,2 @@
|
||||
fn this_is_obviously(not: a, toml: file) {
|
||||
}
|
6
tests/ui-windows/conf_bad_type.rs
Normal file
6
tests/ui-windows/conf_bad_type.rs
Normal file
@ -0,0 +1,6 @@
|
||||
// error-pattern: error reading Clippy's configuration file: `blacklisted-names` is expected to be a `Vec < String >` but is a `integer`
|
||||
|
||||
#![feature(plugin)]
|
||||
#![plugin(clippy(conf_file="./tests/compile-fail/conf_bad_type.toml"))]
|
||||
|
||||
fn main() {}
|
4
tests/ui-windows/conf_bad_type.stderr
Normal file
4
tests/ui-windows/conf_bad_type.stderr
Normal file
@ -0,0 +1,4 @@
|
||||
error: error reading Clippy's configuration file: The system cannot find the file specified. (os error 2)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
1
tests/ui-windows/conf_bad_type.toml
Normal file
1
tests/ui-windows/conf_bad_type.toml
Normal file
@ -0,0 +1 @@
|
||||
blacklisted-names = 42
|
6
tests/ui-windows/conf_non_existant.rs
Normal file
6
tests/ui-windows/conf_non_existant.rs
Normal file
@ -0,0 +1,6 @@
|
||||
// error-pattern: error reading Clippy's configuration file
|
||||
|
||||
#![feature(plugin)]
|
||||
#![plugin(clippy(conf_file="./tests/auxiliary/non_existant_conf.toml"))]
|
||||
|
||||
fn main() {}
|
4
tests/ui-windows/conf_non_existant.stderr
Normal file
4
tests/ui-windows/conf_non_existant.stderr
Normal file
@ -0,0 +1,4 @@
|
||||
error: error reading Clippy's configuration file: The system cannot find the file specified. (os error 2)
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
Reference in New Issue
Block a user