Skip to content

Commit

Permalink
Bump ui_test crate
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Aug 9, 2023
1 parent 11cf417 commit 3daca0b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ tempfile = { version = "3.2", optional = true }
termize = "0.1"

[dev-dependencies]
ui_test = "0.13"
ui_test = "0.15"
tester = "0.9"
regex = "1.5"
toml = "0.7.3"
Expand Down
28 changes: 14 additions & 14 deletions tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,10 @@ fn run_ui() {
let quiet = args.quiet;

compiletest::run_tests_generic(
config,
vec![config],
std::thread::available_parallelism().unwrap(),
args,
move |path, args| compiletest::default_file_filter(path, args) && test_filter(path),
move |path, args, config| compiletest::default_file_filter(path, args, config) && test_filter(path),
compiletest::default_per_file_config,
if quiet {
status_emitter::Text::quiet()
Expand All @@ -226,9 +227,10 @@ fn run_internal_tests() {
let quiet = args.quiet;

compiletest::run_tests_generic(
config,
vec![config],
std::thread::available_parallelism().unwrap(),
args,
move |path, args| compiletest::default_file_filter(path, args) && test_filter(path),
move |path, args, config| compiletest::default_file_filter(path, args, config) && test_filter(path),
compiletest::default_per_file_config,
if quiet {
status_emitter::Text::quiet()
Expand Down Expand Up @@ -258,16 +260,15 @@ fn run_ui_toml() {
let quiet = args.quiet;

ui_test::run_tests_generic(
config,
vec![config],
std::thread::available_parallelism().unwrap(),
args,
|path, args| compiletest::default_file_filter(path, args) && test_filter(path),
|config, path| {
let mut config = config.clone();
|path, args, config| compiletest::default_file_filter(path, args, config) && test_filter(path),
|config, path, _file_contents| {
config
.program
.envs
.push(("CLIPPY_CONF_DIR".into(), Some(path.parent().unwrap().into())));
Some(config)
},
if quiet {
status_emitter::Text::quiet()
Expand Down Expand Up @@ -317,19 +318,18 @@ fn run_ui_cargo() {
let quiet = args.quiet;

ui_test::run_tests_generic(
config,
vec![config],
std::thread::available_parallelism().unwrap(),
args,
|path, _args| test_filter(path) && path.ends_with("Cargo.toml"),
|config, path| {
let mut config = config.clone();
|path, _args, _config| test_filter(path) && path.ends_with("Cargo.toml"),
|config, path, _file_contents| {
config.out_dir = canonicalize(
std::env::current_dir()
.unwrap()
.join("target")
.join("ui_test_cargo/")
.join(path.parent().unwrap()),
);
Some(config)
},
if quiet {
status_emitter::Text::quiet()
Expand Down

0 comments on commit 3daca0b

Please sign in to comment.