Skip to content

Commit

Permalink
Bump ui_test to 0.23
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed May 2, 2024
1 parent 852a64f commit dcfc3b5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ color-print = "0.3.4"
anstream = "0.6.0"

[dev-dependencies]
ui_test = "0.22.2"
ui_test = "0.23"
regex = "1.5.5"
toml = "0.7.3"
walkdir = "2.3"
Expand Down
13 changes: 7 additions & 6 deletions tests/compile-test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#![warn(rust_2018_idioms, unused_lifetimes)]
#![allow(unused_extern_crates)]

use ui_test::custom_flags::rustfix::RustfixMode;
use ui_test::spanned::Spanned;
use ui_test::{status_emitter, Args, CommandBuilder, Config, Match, Mode, OutputConflictHandling};

Expand Down Expand Up @@ -122,10 +123,11 @@ fn base_config(test_dir: &str) -> (Config, Args) {
out_dir: target_dir.join("ui_test"),
..Config::rustc(Path::new("tests").join(test_dir))
};
config.comment_defaults.base().mode = Some(Spanned::dummy(Mode::Yolo {
rustfix: ui_test::RustfixMode::Everything,
}))
.into();
config.comment_defaults.base().mode = Some(Spanned::dummy(Mode::Yolo)).into();
config
.comment_defaults
.base()
.set_custom("rustfix", RustfixMode::Everything);
config.comment_defaults.base().diagnostic_code_prefix = Some(Spanned::dummy("clippy::".into())).into();
config.with_args(&args);
let current_exe_path = env::current_exe().unwrap();
Expand Down Expand Up @@ -235,13 +237,12 @@ fn run_ui_cargo() {
.push(("RUSTFLAGS".into(), Some("-Dwarnings".into())));
// We need to do this while we still have a rustc in the `program` field.
config.fill_host_and_target().unwrap();
config.dependencies_crate_manifest_path = None;
config.program.program.set_file_name(if cfg!(windows) {
"cargo-clippy.exe"
} else {
"cargo-clippy"
});
config.comment_defaults.base().edition = Default::default();
config.comment_defaults.base().custom.clear();

config
.comment_defaults
Expand Down

0 comments on commit dcfc3b5

Please sign in to comment.