Skip to content

Commit

Permalink
bugs: simplify test
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenesvk committed Dec 7, 2024
1 parent afc8b81 commit 2343235
Showing 1 changed file with 13 additions and 95 deletions.
108 changes: 13 additions & 95 deletions src/macos/test_macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,101 +6,19 @@ use crate::{
use serial_test::serial;
use std::path::PathBuf;


use std::{thread, time};
#[test] #[serial] fn test_x1 () {
use std::{thread, time};
println!("sleeping");
let ten_millis = time::Duration::from_millis(3000);
thread::sleep(ten_millis);
init_logging();
let mut trash_ctx = TrashContext::default();
trash_ctx.set_delete_method(DeleteMethod::Finder);

let path1 = PathBuf::from(get_unique_name());
let path2 = PathBuf::from(get_unique_name());
trash_ctx.delete_all(&[&path1, &path2]).unwrap();
}

#[test] #[serial] fn test_x2 () {
use std::{thread, time};
println!("sleeping");
let ten_millis = time::Duration::from_millis(3000);
thread::sleep(ten_millis);
init_logging();
let mut trash_ctx = TrashContext::default();
trash_ctx.set_delete_method(DeleteMethod::Finder);

let path1 = PathBuf::from(get_unique_name());
let path2 = PathBuf::from(get_unique_name());
trash_ctx.delete_all(&[&path1, &path2]).unwrap();
}

#[test] #[serial] fn test_x3 () {
use std::{thread, time};
println!("sleeping");
let ten_millis = time::Duration::from_millis(3000);
thread::sleep(ten_millis);
init_logging();
let mut trash_ctx = TrashContext::default();
trash_ctx.set_delete_method(DeleteMethod::Finder);

let path1 = PathBuf::from(get_unique_name());
let path2 = PathBuf::from(get_unique_name());
trash_ctx.delete_all(&[&path1, &path2]).unwrap();
}

#[test] #[serial] fn test_x4 () {
use std::{thread, time};
println!("sleeping");
let ten_millis = time::Duration::from_millis(3000);
thread::sleep(ten_millis);
init_logging();
let mut trash_ctx = TrashContext::default();
trash_ctx.set_delete_method(DeleteMethod::Finder);

let path1 = PathBuf::from(get_unique_name());
let path2 = PathBuf::from(get_unique_name());
trash_ctx.delete_all(&[&path1, &path2]).unwrap();
}

#[test] #[serial] fn test_x5 () {
use std::{thread, time};
println!("sleeping");
let ten_millis = time::Duration::from_millis(3000);
thread::sleep(ten_millis);
init_logging();
let mut trash_ctx = TrashContext::default();
trash_ctx.set_delete_method(DeleteMethod::Finder);

let path1 = PathBuf::from(get_unique_name());
let path2 = PathBuf::from(get_unique_name());
trash_ctx.delete_all(&[&path1, &path2]).unwrap();
}

#[test] #[serial] fn test_x6 () {
use std::{thread, time};
println!("sleeping");
let ten_millis = time::Duration::from_millis(3000);
thread::sleep(ten_millis);
init_logging();
let mut trash_ctx = TrashContext::default();
trash_ctx.set_delete_method(DeleteMethod::Finder);

let path1 = PathBuf::from(get_unique_name());
let path2 = PathBuf::from(get_unique_name());
trash_ctx.delete_all(&[&path1, &path2]).unwrap();
}

#[test] #[serial] fn test_x7 () {
use std::{thread, time};
println!("sleeping");
let ten_millis = time::Duration::from_millis(3000);
thread::sleep(ten_millis);
init_logging();
let mut trash_ctx = TrashContext::default();
trash_ctx.set_delete_method(DeleteMethod::Finder);

let path1 = PathBuf::from(get_unique_name());
let path2 = PathBuf::from(get_unique_name());
trash_ctx.delete_all(&[&path1, &path2]).unwrap();
for i in 0..10 {
println!("{i} sleeping");
let ten_millis = time::Duration::from_millis(1000);
thread::sleep(ten_millis);

let mut trash_ctx = TrashContext::default();
trash_ctx.set_delete_method(DeleteMethod::Finder);

let path1 = PathBuf::from(get_unique_name());
let path2 = PathBuf::from(get_unique_name());
trash_ctx.delete_all(&[&path1, &path2]).unwrap();
}
}

0 comments on commit 2343235

Please sign in to comment.