Skip to content

Commit

Permalink
Resolve conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
hanbings committed Jul 11, 2024
1 parent 30ecf22 commit 81cc4d7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 22 deletions.
20 changes: 11 additions & 9 deletions src/find/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,17 @@ mod tests {
assert_eq!(rc, 0);
}

#[test]
#[cfg(unix)]
fn test_noleaf() {
use crate::find::tests::FakeDependencies;

let deps = FakeDependencies::new();
let rc = find_main(&["find", "./test_data/simple/subdir", "-noleaf"], &deps);

assert_eq!(rc, 0);
}

#[test]
#[cfg(unix)]
fn test_daystart() {
Expand Down Expand Up @@ -1260,15 +1271,6 @@ mod tests {
],
&deps,
);
}

#[test]
#[cfg(unix)]
fn test_noleaf() {
use crate::find::tests::FakeDependencies;

let deps = FakeDependencies::new();
let rc = find_main(&["find", "./test_data/simple/subdir", "-noleaf"], &deps);

assert_eq!(rc, 0);
}
Expand Down
26 changes: 13 additions & 13 deletions tests/find_cmd_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -882,6 +882,18 @@ fn find_samefile() {
.stderr(predicate::str::contains("not-exist-file"));
}

#[test]
#[serial(working_dir)]
fn find_noleaf() {
Command::cargo_bin("find")
.expect("found binary")
.args(["test_data/simple/subdir", "-noleaf"])
.assert()
.success()
.stdout(predicate::str::contains("test_data/simple/subdir"))
.stderr(predicate::str::is_empty());
}

#[test]
#[serial(working_dir)]
fn find_ignore_readdir_race() {
Expand All @@ -905,16 +917,4 @@ fn find_ignore_readdir_race() {
.assert()
.success()
.stderr(predicate::str::is_empty());
}

#[test]
#[serial(working_dir)]
fn find_noleaf() {
Command::cargo_bin("find")
.expect("found binary")
.args(["test_data/simple/subdir", "-noleaf"])
.assert()
.success()
.stdout(predicate::str::contains("test_data/simple/subdir"))
.stderr(predicate::str::is_empty());
}
}

0 comments on commit 81cc4d7

Please sign in to comment.