Skip to content

Commit

Permalink
some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang committed Sep 12, 2024
1 parent 97f8134 commit 2c81f14
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/integration/valid_config_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ use std::{
};

use regex::Regex;
use tempfile::TempPath;

use crate::util::spawn_btm_in_pty;

Expand Down Expand Up @@ -77,8 +78,6 @@ fn test_uncommented_default_config(original: &Path, test_name: &str) {
}
};

println!("default config: {default_config}");

let default_config = Regex::new(r"(?m)^#([a-zA-Z\[])")
.unwrap()
.replace_all(&default_config, "$1");
Expand Down Expand Up @@ -129,7 +128,11 @@ fn test_new_default() {

if !actual_temp_default_path.exists() {
run_and_kill(&["-C", &(actual_temp_default_path.to_string_lossy())]);

let actual_temp_default_path = TempPath::from_path(actual_temp_default_path);
test_uncommented_default_config(&actual_temp_default_path, "test_new_default");

actual_temp_default_path.close().unwrap();
} else {
println!("temp path we want to check exists, skip test_new_default test.");
}
Expand Down

0 comments on commit 2c81f14

Please sign in to comment.