mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
commit
8816f29267
1 changed files with 5 additions and 1 deletions
|
@ -2,6 +2,8 @@ use crate::common::util::*;
|
||||||
use filetime::FileTime;
|
use filetime::FileTime;
|
||||||
use rust_users::*;
|
use rust_users::*;
|
||||||
use std::os::unix::fs::PermissionsExt;
|
use std::os::unix::fs::PermissionsExt;
|
||||||
|
#[cfg(target_os = "linux")]
|
||||||
|
use std::thread::sleep;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_install_help() {
|
fn test_install_help() {
|
||||||
|
@ -452,7 +454,6 @@ fn test_install_copy_then_compare_file() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
#[ignore]
|
|
||||||
fn test_install_copy_then_compare_file_with_extra_mode() {
|
fn test_install_copy_then_compare_file_with_extra_mode() {
|
||||||
let scene = TestScenario::new(util_name!());
|
let scene = TestScenario::new(util_name!());
|
||||||
let at = &scene.fixtures;
|
let at = &scene.fixtures;
|
||||||
|
@ -471,6 +472,7 @@ fn test_install_copy_then_compare_file_with_extra_mode() {
|
||||||
|
|
||||||
let mut file2_meta = at.metadata(file2);
|
let mut file2_meta = at.metadata(file2);
|
||||||
let before = FileTime::from_last_modification_time(&file2_meta);
|
let before = FileTime::from_last_modification_time(&file2_meta);
|
||||||
|
sleep(std::time::Duration::from_millis(1000));
|
||||||
|
|
||||||
scene
|
scene
|
||||||
.ucmd()
|
.ucmd()
|
||||||
|
@ -487,6 +489,8 @@ fn test_install_copy_then_compare_file_with_extra_mode() {
|
||||||
|
|
||||||
assert!(before != after_install_sticky);
|
assert!(before != after_install_sticky);
|
||||||
|
|
||||||
|
sleep(std::time::Duration::from_millis(1000));
|
||||||
|
|
||||||
// dest file still 1644, so need_copy ought to return `true`
|
// dest file still 1644, so need_copy ought to return `true`
|
||||||
scene
|
scene
|
||||||
.ucmd()
|
.ucmd()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue