Fix test failures due to CLI parameters

Fixes #5717.
This commit is contained in:
Christian Duerr 2021-12-25 20:32:54 +01:00 committed by GitHub
parent 3af1940192
commit e0f8320c39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -12,7 +12,7 @@ use crate::config::window::{Class, DEFAULT_NAME};
use crate::config::{serde_utils, UiConfig};
/// CLI options for the main Alacritty executable.
#[derive(StructOpt, Debug)]
#[derive(StructOpt, Default, Debug)]
#[structopt(author, about, version = env!("VERSION"))]
pub struct Options {
/// Print all events to stdout.
@ -283,7 +283,7 @@ mod tests {
let mut config = UiConfig::default();
let old_dynamic_title = config.window.dynamic_title;
Options::new().override_config(&mut config);
Options::default().override_config(&mut config);
assert_eq!(old_dynamic_title, config.window.dynamic_title);
}
@ -292,7 +292,7 @@ mod tests {
fn dynamic_title_overridden_by_options() {
let mut config = UiConfig::default();
let options = Options { title: Some("foo".to_owned()), ..Options::new() };
let options = Options { title: Some("foo".to_owned()), ..Options::default() };
options.override_config(&mut config);
assert!(!config.window.dynamic_title);
@ -303,7 +303,7 @@ mod tests {
let mut config = UiConfig::default();
config.window.title = "foo".to_owned();
Options::new().override_config(&mut config);
Options::default().override_config(&mut config);
assert!(config.window.dynamic_title);
}